Closed
Description
http://doc.rust-lang.org/nightly/std/mem/fn.transmute_copy.html#examples
use std::mem;
let one = unsafe { mem::transmute_copy(&1) };
assert_eq!(1, one);
This transmutes an i32
to... an i32
! A more realistic example might be to transmute a byte array to a packed struct.
Metadata
Metadata
Assignees
Labels
No labels