Björn Tantau@swg-empire.de to Programmer Humor · 21 hours agoPretty straight forwardswg-empire.deimagemessage-square45fedilinkarrow-up1651arrow-down110file-text
arrow-up1641arrow-down1imagePretty straight forwardswg-empire.deBjörn Tantau@swg-empire.de to Programmer Humor · 21 hours agomessage-square45fedilinkfile-text
minus-squarecalcopiritus@lemmy.worldlinkfedilinkarrow-up1·12 hours agounsafe 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.
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.