File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1129,7 +1129,8 @@ pub fn exit(code: i32) -> ! {
1129
1129
/// This is in contrast to the default behaviour of [`panic!`] which unwinds
1130
1130
/// the current thread's stack and calls all destructors.
1131
1131
/// When `panic="abort"` is set, either as an argument to `rustc` or in a
1132
- /// crate's Cargo.toml, [`panic!`] and `abort` are equivalent.
1132
+ /// crate's Cargo.toml, [`panic!`] and `abort` are similar. However,
1133
+ /// [`panic!`] will still call the [panic hook] while `abort` will not.
1133
1134
///
1134
1135
/// If a clean shutdown is needed it is recommended to only call
1135
1136
/// this function at a known point where there are no more destructors left
@@ -1171,6 +1172,7 @@ pub fn exit(code: i32) -> ! {
1171
1172
/// ```
1172
1173
///
1173
1174
/// [`panic!`]: ../../std/macro.panic.html
1175
+ /// [panic hook]: ../../std/panic/fn.set_hook.html
1174
1176
#[ stable( feature = "process_abort" , since = "1.17.0" ) ]
1175
1177
pub fn abort ( ) -> ! {
1176
1178
unsafe { :: sys:: abort_internal ( ) } ;
You can’t perform that action at this time.
0 commit comments