Rust code, including within
unsafe blocks and
unsafe functions is incorrect if it exhibits any of the behaviors in the following list. It is the programmer's responsibility when writing
unsafe code that it is not possible to let
safe code exhibit these behaviors.
Warning: The following list is not exhaustive. There is no formal model of Rust's semantics for what is and is not allowed in unsafe code, so there may be more behavior considered unsafe. The following list is just what we know for sure is undefined behavior. Please read the Rustonomicon before writing unsafe code.
&Tfollow LLVM’s scoped noalias model, except if the
letbinding), unless that data is contained within an
1) in a
enumnot included in the type definition.
charwhich is a surrogate or above
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.