Make FatalErrorMarker lower priority than other panics

This commit is contained in:
John Kåre Alsaker 2023-11-03 10:56:30 +01:00
parent 1d6f05fd37
commit ff1858e2aa
3 changed files with 30 additions and 14 deletions

View file

@ -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> {