about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-07-12 06:58:43 -0600
committerGitHub <noreply@github.com>2017-07-12 06:58:43 -0600
commit500518ab7228aef2de33201857e135487bd40edc (patch)
tree8773263e71679031e0d9167dd7a57b264cbdc052
parent8bba5ad3098e3f20ab3c506e5a421df5da010df9 (diff)
parent133c1bc9ac998d22a0028d2f2e15473f0d1d08ab (diff)
downloadrust-500518ab7228aef2de33201857e135487bd40edc.tar.gz
rust-500518ab7228aef2de33201857e135487bd40edc.zip
Rollup merge of #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.
-rw-r--r--src/libcore/macros.rs2
-rw-r--r--src/libstd/macros.rs5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 70820dce5f9..ae74016ad74 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -462,7 +462,7 @@ macro_rules! writeln {
 ///
 /// # Panics
 ///
-/// This will always panic.
+/// This will always [panic!](macro.panic.html)
 ///
 /// # Examples
 ///
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 6eb9faacf7f..6ad22820a7d 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -24,6 +24,11 @@
 /// The multi-argument form of this macro panics with a string and has the
 /// `format!` syntax for building a string.
 ///
+/// # Current implementation
+///
+/// If the main thread panics it will terminate all your threads and end your
+/// program with code `101`.
+///
 /// # Examples
 ///
 /// ```should_panic