Personally, I feel "safety" generalizes pretty well to "any concept that should be called out explicitly as unsafe"--not just memory safety.
On Sun, Sep 21, 2014 at 4:12 PM, Daniel Micay <danielmi...@gmail.com> wrote: > On 21/09/14 05:57 AM, Simon Sapin wrote: >> On 21/09/14 07:34, Daniel Micay wrote: >>> It's not intended to be used for anything other than memory safety. >> >> It’s also used to maintain invariants, such as the bytes inside a String >> being valid UTF-8: String::push_bytes() is unsafe, but >> String::push_str() is not. > > No, it's not used to maintain invariants unrelated to memory safety. > > Strings assume the contents are UTF-8 and violating that invariant would > violate memory safety. > > > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev > _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev