Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize the core::panic module #66771

Merged
merged 3 commits into from
Dec 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/libcore/panic.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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(
Expand All @@ -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)) {
Expand Down Expand Up @@ -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
}
Expand Down