Fix display of panic message in recursive panic.
This commit is contained in:
@@ -157,4 +157,9 @@ pub unsafe trait PanicPayload: crate::fmt::Display {
|
||||
|
||||
/// Just borrow the contents.
|
||||
fn get(&mut self) -> &(dyn Any + Send);
|
||||
|
||||
/// Try to borrow the contents as `&str`, if possible without doing any allocations.
|
||||
fn as_str(&mut self) -> Option<&str> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user