Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unsafe in Rust doesn't mean anything goes. Specifically it means that you are going to 1) dereference a raw pointer; or 2) call an unsafe function/method; or 3) access/modify a mutable static variable; or 4) implement an unsafe trait; or 5) access fields of a union.

You still get the safety guarantees of Rust in unsafe code like bounds checking and lifetimes.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: