3 ms·
>(you have to use 'unsafe' to turn off the safety features) "unsafe" doesn't turn off any safety features, it just allows you to do additional things which the
by dralley 4y ago
>(you have to use 'unsafe' to turn off the safety features)
"unsafe" doesn't turn off any safety features, it just allows you to do additional things which the base language does not, like:
* use raw pointers
* use mutable static globals
* access fields of unions
https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#unsafe-superpowers https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#unsa...
All the rules of safe Rust still apply inside of unsafe blocks. The borrow checker still works, etc.