• calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    12 hours ago
    unsafe fn<'a, T>(p: &'a T) -> &'static mut T {
        p as *cons T as *mut T as &'static mut T
    }
    

    It is a bit more than just dereferencing raw pointers.