External Publication
Visit Post

Language vision regarding safety guarantees

Rust Internals [Unofficial] July 1, 2026
Source

ais523:

The safety comments in BTreeMap's source code for the calls to insert_before_unchecked assume that Ord is non-broken, which is not a sound assumption given that Ord is not a safe trait.

Safety requirements are for external callers from outside of the abstraction boundary. When calling functions in your own module / crate you can ignore documented safety requirements.

Discussion in the ATmosphere

Loading comments...