Auto merge of #47687 - SimonSapin:panic-impl, r=sfackler
RFC 2070 part 1: PanicInfo and Location API changes This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html Tracking issue: https://github.com/rust-lang/rust/issues/44489 * Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`. * Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`. * Implement `Display` for `PanicInfo` and `Location`
This commit is contained in:
commit
1ad094d81c
7 changed files with 279 additions and 199 deletions
|
@ -23,7 +23,10 @@ use sync::{Arc, Mutex, RwLock, atomic};
|
|||
use thread::Result;
|
||||
|
||||
#[stable(feature = "panic_hooks", since = "1.10.0")]
|
||||
pub use panicking::{take_hook, set_hook, PanicInfo, Location};
|
||||
pub use panicking::{take_hook, set_hook};
|
||||
|
||||
#[stable(feature = "panic_hooks", since = "1.10.0")]
|
||||
pub use core::panic::{PanicInfo, Location};
|
||||
|
||||
/// A marker trait which represents "panic safe" types in Rust.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue