Searched refs:from_mut (Results 1 – 15 of 15) sorted by relevance
| /linux/rust/kernel/ |
| H A D | uaccess.rs | 289 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 D | str.rs | 331 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 D | bitmap.rs | 82 core::ptr::from_mut::<Bitmap>(self).cast::<usize>() in as_mut_ptr()
|
| H A D | rbtree.rs | 14 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 D | inner.rs | 157 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 D | ptr.rs | 205 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 D | transmute.rs | 498 <Dst as SizeEq<Src>>::CastFrom::project(crate::pointer::PtrInner::from_mut(&mut src)); in test_size_eq()
|
| /linux/rust/kernel/sync/atomic/ |
| H A D | internal.rs | 319 // 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 D | ref.rs | 681 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 D | wrappers.rs | 223 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 D | lib.rs | 2210 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 D | split_at.rs | 606 let source = Ptr::from_mut(self.source); in into_ptr()
|
| H A D | impls.rs | 1807 let c = Ptr::from_mut(&mut *val); in test_impls()
|
| /linux/rust/zerocopy/src/util/ |
| H A D | macro_util.rs | 658 let ptr = Ptr::from_mut(self.0); in try_transmute_mut() 911 let ptr = Ptr::from_mut(self.0) in transmute_mut()
|
| H A D | mod.rs | 363 let dst = Ptr::from_mut(src).transmute(); in transmute_mut()
|