Lines Matching full:invariant
203 // Guaranteed by the type invariant to never underflow. in inc_len()
205 // INVARIANT: By the safety requirements of this method this represents the exact number of in inc_len()
220 // INVARIANT: We relinquish ownership of the elements within the range `[self.len - count, in dec_len()
286 // INVARIANT: Since this is a new, empty `Vec` with no backing memory yet, in new()
302 // - `self.len` is smaller than `self.capacity` by the type invariant and hence, the in spare_capacity_mut()
411 // INVARIANT: This breaks the Vec invariants by making `index` contain an invalid element, in insert_within_capacity()
416 // INVARIANT: This restores the Vec invariants. in insert_within_capacity()
468 // INVARIANT: This breaks the invariants by invalidating the value at index `i`, but we in remove()
478 // INVARIANT: After this call, the invalid value is at the last slot, so the Vec invariants in remove()
559 // INVARIANT: For ZSTs, we store an empty `ArrayLayout`, all other type invariants are in from_raw_parts()
654 // INVARIANT: in reserve()
707 // INVARIANT: The first `len` elements of the spare capacity are valid values, and as we in drain_all()
836 // SAFETY: `self.as_mut_ptr` is guaranteed to be valid by the type invariant. in drop()
1158 // invariant. in collect()
1162 // the type invariant to be smaller than `cap`. Depending on `realloc` this operation in collect()
1258 // SAFETY: `self.ptr` is guaranteed to be valid by the type invariant. in drop()