Skip to content
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*.exe
*.fn
*.html
*.kdev4
*.ky
*.ll
*.llvm
Expand Down
3 changes: 0 additions & 3 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1047,11 +1047,8 @@ This is a list of behavior not considered *unsafe* in Rust terms, but that may
be undesired.

* Deadlocks
* Reading data from private fields (`std::repr`)
* Leaks of memory and other resources
* Exiting without calling destructors
* Sending signals
* Accessing/modifying the file system
* Integer overflow
- Overflow is considered "unexpected" behavior and is always user-error,
unless the `wrapping` primitives are used. In non-optimized builds, the compiler
Expand Down
7 changes: 2 additions & 5 deletions src/doc/trpl/unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ two contexts. The first one is to mark a function as unsafe:

```rust
unsafe fn danger_will_robinson() {
// scary stuff
// scary stuff
}
```

Expand Down Expand Up @@ -68,11 +68,8 @@ Whew! That’s a bunch of stuff. It’s also important to notice all kinds of
behaviors that are certainly bad, but are expressly _not_ unsafe:

* Deadlocks
* Reading data from private fields
* Leaks due to reference count cycles
* Leaks of memory or other resources
* Exiting without calling destructors
* Sending signals
* Accessing/modifying the file system
* Integer overflow

Rust cannot prevent all kinds of software problems. Buggy code can and will be
Expand Down
22 changes: 0 additions & 22 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,6 @@
//! library. Each macro is available for use when linking against the standard
//! library.

/// The entry point for panic of Rust threads.
///
/// This macro is used to inject panic into a Rust thread, causing the thread to
/// unwind and panic entirely. Each thread's panic can be reaped as the
/// `Box<Any>` type, and the single-argument form of the `panic!` macro will be
/// the value which is transmitted.
///
/// The multi-argument form of this macro panics with a string and has the
/// `format!` syntax for building a string.
///
/// # Examples
///
/// ```should_panic
/// # #![allow(unreachable_code)]
/// panic!();
/// panic!("this is a terrible mistake!");
/// panic!(4); // panic with the value of 4 to be collected elsewhere
/// panic!("this is a {} {message}", "fancy", message = "message");
/// ```
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable]
/// The entry point for panic of Rust threads.
///
/// This macro is used to inject panic into a Rust thread, causing the thread to
Expand Down