Make FatalErrorMarker
lower priority than other panics
This commit is contained in:
parent
1d6f05fd37
commit
ff1858e2aa
3 changed files with 30 additions and 14 deletions
|
@ -127,6 +127,9 @@ impl<F: FnOnce()> Drop for OnDrop<F> {
|
|||
}
|
||||
}
|
||||
|
||||
/// This is a marker for a fatal compiler error used with `resume_unwind`.
|
||||
pub struct FatalErrorMarker;
|
||||
|
||||
/// Turns a closure that takes an `&mut Formatter` into something that can be display-formatted.
|
||||
pub fn make_display(f: impl Fn(&mut fmt::Formatter<'_>) -> fmt::Result) -> impl fmt::Display {
|
||||
struct Printer<F> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue