Home
last modified time | relevance | path

Searched refs:from_mut (Results 1 – 15 of 15) sorted by relevance

/linux/rust/kernel/
H A Duaccess.rs289 let out = unsafe { &mut *(core::ptr::from_mut(out) as *mut [MaybeUninit<u8>]) }; in read_slice()
399 let mut dst = unsafe { &mut *(core::ptr::from_mut(buf) as *mut [MaybeUninit<u8>]) }; in strcpy_into_buf()
H A Dstr.rs331 unsafe { &mut *(core::ptr::from_mut(s) as *mut [u8]) } in from_bytes_with_nul_unchecked_mut()
348 unsafe { &mut *(core::ptr::from_mut(bytes) as *mut CStr) } in make_ascii_lowercase()
H A Dbitmap.rs82 core::ptr::from_mut::<Bitmap>(self).cast::<usize>() in as_mut_ptr()
H A Drbtree.rs14 ptr::{addr_of_mut, from_mut, NonNull},
224 next: unsafe { bindings::rb_first(from_mut(&mut self.root)) }, in iter_mut()
/linux/rust/zerocopy/src/pointer/
H A Dinner.rs157 pub fn from_mut(ptr: &'a mut T) -> Self { in from_mut() method
749 let p = PtrInner::from_mut(&mut x); in test_ptr_inner_clone()
H A Dptr.rs205 pub fn from_mut(ptr: &'a mut T) -> Self { in from_mut() function
206 let inner = PtrInner::from_mut(ptr); in from_mut()
1575 let mut iter = Ptr::from_mut(&mut arr[..]).iter(); in test_iter_exclusive_yields_disjoint_ptrs()
H A Dtransmute.rs498 <Dst as SizeEq<Src>>::CastFrom::project(crate::pointer::PtrInner::from_mut(&mut src)); in test_size_eq()
/linux/rust/kernel/sync/atomic/
H A Dinternal.rs319 // SAFETY: `a.as_ptr()` is valid and properly aligned. `core::ptr::from_mut(old)`
321 unsafe { bindings::#call(a.as_ptr().cast(), core::ptr::from_mut(old), new) }
/linux/rust/zerocopy/src/
H A Dref.rs681 let ptr = Ptr::from_mut(b); in into_mut()
704 let ptr = Ptr::from_mut(b.into_byte_slice_mut()) in into_mut()
857 let ptr = Ptr::from_mut(b); in deref_mut()
880 let ptr = Ptr::from_mut(b) in deref_mut()
H A Dwrappers.rs223 let inner = Ptr::from_mut(self).transmute::<_, _, (_, (_, _))>(); in try_deref_mut()
419 Ptr::from_mut(self).transmute::<_, _, (_, (_, _))>().bikeshed_recall_aligned().as_mut() in deref_mut()
H A Dlib.rs2210 match Ptr::from_mut(bytes).try_cast_into_no_leftover::<Self, BecauseExclusive>(None) { in try_mut_from_bytes()
2851 match Ptr::from_mut(source).try_cast_into_no_leftover::<Self, BecauseExclusive>(Some(count)) in try_mut_from_bytes_with_elems()
3323 match Ptr::from_mut(candidate).try_cast_into::<T, BecauseExclusive>(cast_type, meta) { in try_mut_from_prefix_suffix()
3352 let c_ptr = Ptr::from_mut(&mut candidate); in try_read_from()
4450 match Ptr::from_mut(source).try_cast_into_no_leftover::<_, BecauseExclusive>(None) { in mut_from_bytes()
4990 let source = Ptr::from_mut(source); in mut_from_bytes_with_elems()
5373 let ptr = Ptr::from_mut(&mut buf); in read_from_io()
5500 let (slf, prefix_suffix) = Ptr::from_mut(source) in mut_from_prefix_suffix()
H A Dsplit_at.rs606 let source = Ptr::from_mut(self.source); in into_ptr()
H A Dimpls.rs1807 let c = Ptr::from_mut(&mut *val); in test_impls()
/linux/rust/zerocopy/src/util/
H A Dmacro_util.rs658 let ptr = Ptr::from_mut(self.0); in try_transmute_mut()
911 let ptr = Ptr::from_mut(self.0) in transmute_mut()
H A Dmod.rs363 let dst = Ptr::from_mut(src).transmute(); in transmute_mut()