Home
last modified time | relevance | path

Searched refs:as_ptr (Results 1 – 16 of 16) sorted by relevance

/rust/alloc/vec/
Ddrain.rs114 let unyielded_ptr = this.iter.as_slice().as_ptr(); in keep_rest()
130 let src = source_vec.as_ptr().add(tail); in keep_rest()
190 let src = source_vec.as_ptr().add(tail); in drop()
229 let drop_ptr = iter.as_slice().as_ptr(); in drop()
Dinto_iter.rs128 self.ptr = self.buf.as_ptr(); in forget_allocation_drop_remaining()
129 self.end = self.buf.as_ptr(); in forget_allocation_drop_remaining()
158 let buf = this.buf.as_ptr(); in into_vecdeque()
410 let _ = RawVec::from_raw_parts_in(self.0.buf.as_ptr(), self.0.cap, alloc); in drop()
Dmod.rs1354 pub fn as_ptr(&self) -> *const T { in as_ptr() method
1527 let value = ptr::read(self.as_ptr().add(index)); in swap_remove()
1728 self.v.as_ptr().add(self.processed_len), in retain_mut()
2046 Some(ptr::read(self.as_ptr().add(self.len()))) in pop()
2149 let range_slice = slice::from_raw_parts(self.as_ptr().add(start), end - start); in drain()
2273 ptr::copy_nonoverlapping(self.as_ptr().add(at), other.as_mut_ptr(), other.len()); in split_off()
2851 unsafe { ptr::copy_nonoverlapping(source.as_ptr(), spare.as_mut_ptr() as _, count) }; in spec_extend_from_within()
2870 unsafe { slice::from_raw_parts(self.as_ptr(), self.len) } in deref()
3560 let array = unsafe { ptr::read(vec.as_ptr() as *const [T; N]) };
/rust/alloc/
Dalloc.rs219 let raw_ptr = realloc(ptr.as_ptr(), old_layout, new_size); in grow_impl()
234 ptr::copy_nonoverlapping(ptr.as_ptr(), new_ptr.as_mut_ptr(), old_size); in grow_impl()
260 unsafe { dealloc(ptr.as_ptr(), layout) } in deallocate()
310 let raw_ptr = realloc(ptr.as_ptr(), old_layout, new_size); in shrink()
322 ptr::copy_nonoverlapping(ptr.as_ptr(), new_ptr.as_mut_ptr(), new_size); in shrink()
Draw_vec.rs205 ptr: unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }, in allocate_in()
230 ptr: unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }, in try_allocate_in()
256 self.ptr.as_ptr() in ptr()
411 self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; in set_ptr_and_cap()
Dslice.rs169 s.as_ptr().copy_to_nonoverlapping(v.as_mut_ptr(), s.len()); in to_vec()
517 buf.as_ptr(), in repeat()
538 buf.as_ptr(), in repeat()
Dboxed.rs488 unsafe { Ok(Box::from_raw_in(ptr.as_ptr(), alloc)) } in try_new_uninit_in()
558 unsafe { Ok(Box::from_raw_in(ptr.as_ptr(), alloc)) } in try_new_zeroed_in()
1097 (leaked.as_ptr(), alloc) in into_raw_with_allocator()
1170 unsafe { &mut *mem::ManuallyDrop::new(b).0.as_ptr() } in leak()
1251 Unique::new_unchecked(bytes.as_ptr() as *mut str) in default()
1483 ptr::copy_nonoverlapping(slice.as_ptr(), buf.ptr(), len); in from_slice()
/rust/kernel/
Dkunit.rs21 b"\x013%pA\0".as_ptr() as _, in err()
37 b"\x016%pA\0".as_ptr() as _, in info()
Dprint.rs112 format_string.as_ptr() as _,
113 module_name.as_ptr(),
133 format_strings::CONT.as_ptr() as _, in call_printk_cont()
Dsync.rs34 pub(crate) fn as_ptr(&self) -> *mut bindings::lock_class_key { in as_ptr() method
Dtask.rs159 unsafe { bindings::put_task_struct(obj.cast().as_ptr()) } in dec_ref()
Dstr.rs149 self.0.as_ptr() as _ in as_char_ptr()
472 s.as_bytes().as_ptr(), in write_str()
575 let ptr = unsafe { bindings::memchr(buf.as_ptr().cast(), 0, (f.bytes_written() - 1) as _) }; in try_from_fmt()
Dtypes.rs77 core::ptr::NonNull::dangling().as_ptr() in into_foreign()
/rust/kernel/sync/
Darc.rs232 core::ptr::eq(this.ptr.as_ptr(), other.ptr.as_ptr()) in ptr_eq()
240 ManuallyDrop::new(self).ptr.as_ptr() as _ in into_foreign()
305 unsafe { Box::from_raw(self.ptr.as_ptr()) }; in drop()
Dcondvar.rs101 bindings::__init_waitqueue_head(slot, name.as_char_ptr(), key.as_ptr()) in new()
Dlock.rs110 B::init(slot, name.as_char_ptr(), key.as_ptr()) in new()