diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-30 08:57:34 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-30 09:29:23 -0700 |
| commit | 1e919c93c7b643bf81fd065c2be947138621143d (patch) | |
| tree | 83d58170b91f510121c5177d1057d2fbd9cff6fc | |
| parent | 5ee856988903b57737cb5ea291e2d8c649999e93 (diff) | |
| parent | 8a719255589bcbc82c961e051f09678b524f4149 (diff) | |
| download | rust-1e919c93c7b643bf81fd065c2be947138621143d.tar.gz rust-1e919c93c7b643bf81fd065c2be947138621143d.zip | |
rollup merge of #18408 : thestinger/unsafe
| -rw-r--r-- | src/doc/reference.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index fab46971230..d8c26bbbf8c 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1153,7 +1153,7 @@ exposing an API making it possible for it to occur in safe code. * Data races * Dereferencing a null/dangling raw pointer -* Mutating an immutable value/reference +* Mutating an immutable value/reference without `UnsafeCell` * Reads of [undef](http://llvm.org/docs/LangRef.html#undefined-values) (uninitialized) memory * Breaking the [pointer aliasing @@ -1166,11 +1166,14 @@ exposing an API making it possible for it to occur in safe code. * Using `std::ptr::copy_nonoverlapping_memory` (`memcpy32`/`memcpy64` instrinsics) on overlapping buffers * Invalid values in primitive types, even in private fields/locals: - * Dangling/null pointers in non-raw pointers, or slices + * Dangling/null references or boxes * A value other than `false` (0) or `true` (1) in a `bool` * A discriminant in an `enum` not included in the type definition * A value in a `char` which is a surrogate or above `char::MAX` * non-UTF-8 byte sequences in a `str` +* Unwinding into Rust from foreign code or unwinding from Rust into foreign + code. Rust's failure system is not compatible with exception handling in + other languages. Unwinding must be caught and handled at FFI boundaries. ##### Behaviour not considered unsafe |
