1
Fork 0

Rollup merge of #26603 - Gankro:ref, r=steveklabnik

Quick poll of basically the entire core team says this is ok.
This commit is contained in:
Manish Goregaokar 2015-06-27 14:18:47 +05:30
commit 6dd33b459b
2 changed files with 2 additions and 8 deletions

View file

@ -1047,11 +1047,8 @@ This is a list of behavior not considered *unsafe* in Rust terms, but that may
be undesired. be undesired.
* Deadlocks * Deadlocks
* Reading data from private fields (`std::repr`)
* Leaks of memory and other resources * Leaks of memory and other resources
* Exiting without calling destructors * Exiting without calling destructors
* Sending signals
* Accessing/modifying the file system
* Integer overflow * Integer overflow
- Overflow is considered "unexpected" behavior and is always user-error, - Overflow is considered "unexpected" behavior and is always user-error,
unless the `wrapping` primitives are used. In non-optimized builds, the compiler unless the `wrapping` primitives are used. In non-optimized builds, the compiler

View file

@ -12,7 +12,7 @@ two contexts. The first one is to mark a function as unsafe:
```rust ```rust
unsafe fn danger_will_robinson() { unsafe fn danger_will_robinson() {
// scary stuff // scary stuff
} }
``` ```
@ -68,11 +68,8 @@ Whew! Thats a bunch of stuff. Its also important to notice all kinds of
behaviors that are certainly bad, but are expressly _not_ unsafe: behaviors that are certainly bad, but are expressly _not_ unsafe:
* Deadlocks * Deadlocks
* Reading data from private fields * Leaks of memory or other resources
* Leaks due to reference count cycles
* Exiting without calling destructors * Exiting without calling destructors
* Sending signals
* Accessing/modifying the file system
* Integer overflow * Integer overflow
Rust cannot prevent all kinds of software problems. Buggy code can and will be Rust cannot prevent all kinds of software problems. Buggy code can and will be