diff options
| author | Pirh <pirh.badger@gmail.com> | 2017-10-02 19:59:50 +0100 |
|---|---|---|
| committer | Pirh <pirh.badger@gmail.com> | 2017-10-02 19:59:50 +0100 |
| commit | 28ef0d1085120d72741bc52fc2dacfe18ebe8a2e (patch) | |
| tree | 51e83696a5b141779e00e3f5b36025c8652b6971 /src/libstd | |
| parent | 7ab20c850e23618d4b8acea22e8930a52b783289 (diff) | |
| download | rust-28ef0d1085120d72741bc52fc2dacfe18ebe8a2e.tar.gz rust-28ef0d1085120d72741bc52fc2dacfe18ebe8a2e.zip | |
Document that process::abort will not call the panic hook
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/process.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index fa9ec4b3185..dbb58991215 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -1129,7 +1129,8 @@ pub fn exit(code: i32) -> ! { /// This is in contrast to the default behaviour of [`panic!`] which unwinds /// the current thread's stack and calls all destructors. /// When `panic="abort"` is set, either as an argument to `rustc` or in a -/// crate's Cargo.toml, [`panic!`] and `abort` are equivalent. +/// crate's Cargo.toml, [`panic!`] and `abort` are similar. However, +/// [`panic!`] will still call the [panic hook] while `abort` will not. /// /// If a clean shutdown is needed it is recommended to only call /// this function at a known point where there are no more destructors left @@ -1171,6 +1172,7 @@ pub fn exit(code: i32) -> ! { /// ``` /// /// [`panic!`]: ../../std/macro.panic.html +/// [panic hook]: ../../std/panic/fn.set_hook.html #[stable(feature = "process_abort", since = "1.17.0")] pub fn abort() -> ! { unsafe { ::sys::abort_internal() }; |
