|
|
|
|
|
by kibwen
3075 days ago
|
|
> Transmute is like, the most unsafe thing possible. Yes, the first rule of auditing Rust unsafe blocks is that if you see someone using std::mem::transmute, you walk over and ask the author if they're really certain what they're doing. :) However, it should be noted that std::mem::transmute still has some guard rails; the real "most unsafe thing possible" is the variant of this function that does away with those guard rails: std::mem::transmute_copy. Required reading: https://doc.rust-lang.org/nightly/nomicon/transmutes.html |
|