fn ptr_as_slice<T>(ptr: &mut T) -> &mut [usize] {
    assert!(mem::size_of::<T>() % mem::size_of::<usize>() == 0);
    let words = mem::size_of::<T>() / mem::size_of::<usize>();
    // SAFE: Points to valid memory (a raw pointer)
    unsafe { slice::from_raw_parts_mut(ptr as *mut _ as *mut usize, words) }
}
/// Obtain mutable access to a pointer's words
Obtain mutable access to a pointer's words
Obtain mutable access to a pointer ' s words
fn ptr_as_slice<T>(ptr: &mut T) -> &mut [usize] {
    assert!(mem::size_of::<T>() % mem::size_of::<usize>() == 0);
    let words = mem::size_of::<T>() / mem::size_of::<usize>();
    // SAFE: Points to valid memory (a raw pointer)
    unsafe { slice::from_raw_parts_mut(ptr as *mut _ as *mut usize, words) }
}
fn ptr_as_slice < T > ( ptr : & mut T ) -> & mut [ usize ] { assert ! ( mem size_of T ( ) mem size_of usize ( ) 0 ) ; let words = mem :: size_of :: < T > ( ) / mem :: size_of :: < usize > ( ) ; // SAFE: Points to valid memory (a raw pointer) unsafe { slice :: from_raw_parts_mut ( ptr as * mut _ as * mut usize , words ) } }
Obtain mutable access to a pointer's words
Obtain mutable access to a pointer ' s words
ptr
&mut T
ptr
&mut T