about summary refs log tree commit diff
path: root/src/libcore/panic.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-16 05:23:35 +0100
committerGitHub <noreply@github.com>2019-12-16 05:23:35 +0100
commit6b9bb745fae49a5a4ebe8ba943cb2ab773abd83c (patch)
tree44765e1a53eba58605e65b30a991c34e9a2aace7 /src/libcore/panic.rs
parent1c12dc8cdf36b62e93ce74cecc15f13e57f281d3 (diff)
parenteab1dc9b562c4ff128575d6af7afe819e34f9340 (diff)
downloadrust-6b9bb745fae49a5a4ebe8ba943cb2ab773abd83c.tar.gz
rust-6b9bb745fae49a5a4ebe8ba943cb2ab773abd83c.zip
Rollup merge of #66771 - SimonSapin:panic-stability, r=KodrAus
Stabilize the `core::panic` module

`std::panic` is already stable.

`core::panic::PanicInfo` and `core::panic::Location` are stable and can be used through that path because of a bug in stability checking: #15702
Diffstat (limited to 'src/libcore/panic.rs')
-rw-r--r--src/libcore/panic.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs
index e924ee20369..48bb504a73c 100644
--- a/src/libcore/panic.rs
+++ b/src/libcore/panic.rs
@@ -1,8 +1,6 @@
 //! Panic support in the standard library.
 
-#![unstable(feature = "core_panic_info",
-            reason = "newly available in libcore",
-            issue = "44489")]
+#![stable(feature = "core_panic_info", since = "1.41.0")]
 
 use crate::any::Any;
 use crate::fmt;
@@ -39,10 +37,10 @@ pub struct PanicInfo<'a> {
 }
 
 impl<'a> PanicInfo<'a> {
-    #![unstable(feature = "panic_internals",
-                reason = "internal details of the implementation of the `panic!` \
-                          and related macros",
-                issue = "0")]
+    #[unstable(feature = "panic_internals",
+               reason = "internal details of the implementation of the `panic!` \
+                         and related macros",
+               issue = "0")]
     #[doc(hidden)]
     #[inline]
     pub fn internal_constructor(
@@ -57,6 +55,10 @@ impl<'a> PanicInfo<'a> {
         }
     }
 
+    #[unstable(feature = "panic_internals",
+               reason = "internal details of the implementation of the `panic!` \
+                         and related macros",
+               issue = "0")]
     #[doc(hidden)]
     #[inline]
     pub fn set_payload(&mut self, info: &'a (dyn Any + Send)) {
@@ -90,7 +92,7 @@ impl<'a> PanicInfo<'a> {
     /// returns that message ready to be used for example with [`fmt::write`]
     ///
     /// [`fmt::write`]: ../fmt/fn.write.html
-    #[unstable(feature = "panic_info_message", issue = "44489")]
+    #[unstable(feature = "panic_info_message", issue = "66745")]
     pub fn message(&self) -> Option<&fmt::Arguments<'_>> {
         self.message
     }