Skip to content

Commit 500518a

Browse files
Rollup merge of rust-lang#42670 - dns2utf8:panic_return_code, r=steveklabnik
Add hint about the return code of panic! I hope the link works on all cases, since the `unreachable` doc is copied to `std::` as well.
2 parents 8bba5ad + 133c1bc commit 500518a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/libcore/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ macro_rules! writeln {
462462
///
463463
/// # Panics
464464
///
465-
/// This will always panic.
465+
/// This will always [panic!](macro.panic.html)
466466
///
467467
/// # Examples
468468
///

src/libstd/macros.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
/// The multi-argument form of this macro panics with a string and has the
2525
/// `format!` syntax for building a string.
2626
///
27+
/// # Current implementation
28+
///
29+
/// If the main thread panics it will terminate all your threads and end your
30+
/// program with code `101`.
31+
///
2732
/// # Examples
2833
///
2934
/// ```should_panic

0 commit comments

Comments
 (0)