diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-11-03 10:56:30 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-11-03 19:46:00 +0100 |
| commit | ff1858e2aa4c7ff60ae72ec7d90973a7a14b94f9 (patch) | |
| tree | 30d08fd52a70b2aa02f89e94bb90e29e6d499304 /compiler/rustc_data_structures/src/lib.rs | |
| parent | 1d6f05fd3735efc8f5af2f6278a3391543c2790b (diff) | |
| download | rust-ff1858e2aa4c7ff60ae72ec7d90973a7a14b94f9.tar.gz rust-ff1858e2aa4c7ff60ae72ec7d90973a7a14b94f9.zip | |
Make `FatalErrorMarker` lower priority than other panics
Diffstat (limited to 'compiler/rustc_data_structures/src/lib.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 5d7f385c6e4..d09c026c4b4 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -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> { |
