Lines Matching defs:add
6376 // Should always overflow in the add-to-len
8055 // Should always overflow in the add-to-len
12431 // Should always overflow in the add-to-len
14201 raw_ptr.add(old_size).write_bytes(0, new_size - old_size);
14723 /// ptr::write(self.buf.ptr().add(self.len), x.clone());
14951 // `> isize::MAX` bytes will surely fail. On 32-bit and 16-bit we need to add
16519 /// inexpensive, it may cause excessive allocation later when you add
17370 ptr::copy(self.vec.as_ptr().add(next), self.vec.as_mut_ptr().add(idx), len - next);
17422 self.vec.as_mut_ptr().add(end - shrunk_by),
17423 self.vec.as_mut_ptr().add(start - shrunk_by),
17489 guard.s.vec.as_ptr().add(guard.idx),
17490 guard.s.vec.as_mut_ptr().add(guard.idx - guard.del_bytes),
17544 ptr::copy(self.vec.as_ptr().add(idx), self.vec.as_mut_ptr().add(idx + amt), len - idx);
17545 ptr::copy(bytes.as_ptr(), self.vec.as_mut_ptr().add(idx), amt);
18254 fn add(mut self, other: &str) -> String {
19252 fn add(mut self, rhs: &'a str) -> Self::Output {
19263 fn add(mut self, rhs: Cow<'a, str>) -> Self::Output {
20837 ptr::write(elems.add(i), item);
20994 /// would otherwise add a cost to all equality checks on refs. We assume that `Rc`s are used to
22121 // We shouldn't add inline attribute to this since this is used in
22519 (buf.as_mut_ptr() as *mut T).add(buf.len()),
22540 (buf.as_mut_ptr() as *mut T).add(buf.len()),
22886 let (v_mid, v_end) = unsafe { (v.add(mid), v.add(len)) };
22911 hole = MergeHole { start: buf, end: buf.add(mid), dest: v };
22935 hole = MergeHole { start: buf, end: buf.add(len - mid), dest: v_mid };
23362 /// data, but it doesn't add thread safety to its data. Consider
24489 ptr::write(elems.add(i), item);
25328 /// would otherwise add a cost to all equality checks on refs. We assume that `Arc`s are used to
31871 /// // add 10 to the value if the key isn't "a"
39574 ptr::copy(slice_ptr.add(idx), slice_ptr.add(idx + 1), len - idx - 1);
39576 (*slice_ptr.add(idx)).write(val);
39590 let ret = (*slice_ptr.add(idx)).assume_init_read();
39591 ptr::copy(slice_ptr.add(idx + 1), slice_ptr.add(idx), len - idx - 1);
39603 ptr::copy(slice_ptr.add(distance), slice_ptr, slice.len() - distance);
39614 ptr::copy(slice_ptr, slice_ptr.add(distance), slice.len() - distance);
40422 /// The "default" usage of this type as a queue is to use [`push_back`] to add to
40540 unsafe { ptr::read(self.ptr().add(off)) }
40547 ptr::write(self.ptr().add(off), value);
40598 ptr::copy(self.ptr().add(src), self.ptr().add(dst), len);
40622 ptr::copy_nonoverlapping(self.ptr().add(src), self.ptr().add(dst), len);
40859 unsafe { Some(&*self.ptr().add(idx)) }
40888 unsafe { Some(&mut *self.ptr().add(idx)) }
40923 unsafe { ptr::swap(self.ptr().add(ri), self.ptr().add(rj)) }
42342 ptr::copy_nonoverlapping(first_half.as_ptr().add(at), other.ptr(), amount_in_first);
42347 other.ptr().add(amount_in_first),
42356 second_half.as_ptr().add(offset),
42572 ptr::copy(buf, buf.add(tail_len), self.head);
42574 ptr::copy_nonoverlapping(buf.add(self.tail), buf, tail_len);
42594 ptr::copy(buf.add(self.tail), buf.add(self.head), tail_len);
42596 ptr::copy_nonoverlapping(buf, buf.add(self.head + tail_len), self.head);
42626 ptr::swap(buf.add(i), buf.offset(src));
43275 ptr::copy(buf.add(other.tail), buf, len);
44351 //! // If so, add it to the frontier and continue
44449 /// // Let's add some scores...
44779 ptr::swap(ptr, ptr.add(end));
45433 let index_ptr: *const _ = ptr.add(index);
45434 let hole_ptr = ptr.add(self.pos);
46016 // `Vec<T>`, so `i` cannot overflow an `isize`, and the `self.ptr.add(i)`
46024 if mem::size_of::<T>() == 0 { mem::zeroed() } else { ptr::read(self.ptr.add(i)) }
46174 let mut ptr = self.as_mut_ptr().add(self.len());
46403 let src = source_vec.as_ptr().add(tail);
46404 let dst = source_vec.as_mut_ptr().add(start);
46729 unsafe { dst_buf.add(len) as *const _ } <= src.ptr,
46755 sink.dst = sink.dst.add(1);
46802 drop_guard.dst = dst.add(1);
47843 let s = ptr::slice_from_raw_parts_mut(self.as_mut_ptr().add(len), remaining_len);
47902 /// assert_eq!(*x_ptr.add(i), 1 << i);
47938 /// *x_ptr.add(i) = i as i32;
48087 let last = ptr::read(self.as_ptr().add(len - 1));
48088 let hole = self.as_mut_ptr().add(index);
48132 let p = self.as_mut_ptr().add(index);
48175 let ptr = self.as_mut_ptr().add(index);
48246 self.v.as_ptr().add(self.processed_len),
48247 self.v.as_mut_ptr().add(self.processed_len - self.deleted_cnt),
48263 let cur = unsafe { &mut *g.v.as_mut_ptr().add(g.processed_len) };
48277 let hole_slot = g.v.as_mut_ptr().add(g.processed_len - g.deleted_cnt);
48369 let dropped_ptr = ptr.add(self.write);
48371 let valid_ptr = ptr.add(self.read);
48396 let read_ptr = ptr.add(gap.read);
48397 let prev_ptr = ptr.add(gap.write.wrapping_sub(1));
48403 let write_ptr = ptr.add(gap.write);
48447 let end = self.as_mut_ptr().add(self.len);
48471 Some(ptr::read(self.as_ptr().add(self.len())))
48506 unsafe { ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) };
48558 let range_slice = slice::from_raw_parts_mut(self.as_mut_ptr().add(start), end - start);
48671 ptr::copy_nonoverlapping(self.as_ptr().add(at), other.as_mut_ptr(), other.len());
48784 self.as_mut_ptr().add(self.len) as *mut MaybeUninit<T>,
49004 let mut ptr = self.as_mut_ptr().add(self.len());
49243 begin.add(me.len()) as *const T
49314 ptr::write(self.as_mut_ptr().add(len), element);
49857 let src = ptr.add(self.drain.idx);
50059 slice::from_raw_parts_mut(vec.as_mut_ptr().add(range_start), range_end - range_start)
50081 let src = vec.as_ptr().add(self.tail_start);
50082 let dst = vec.as_mut_ptr().add(new_tail_start);
50155 let end = i.add(layout.size());
51793 * We could have chosen not to add this impl, and instead have written a