about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_data_structures/src/sync.rs')
-rw-r--r--compiler/rustc_data_structures/src/sync.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs
index bffb98630c8..f30235572d0 100644
--- a/compiler/rustc_data_structures/src/sync.rs
+++ b/compiler/rustc_data_structures/src/sync.rs
@@ -402,6 +402,13 @@ cfg_if! {
                     // We catch panics here ensuring that all the blocks execute.
                     // This makes behavior consistent with the parallel compiler.
                     let mut panic = None;
+                    if let Err(p) = ::std::panic::catch_unwind(
+                        ::std::panic::AssertUnwindSafe(|| $fblock)
+                    ) {
+                        if panic.is_none() {
+                            panic = Some(p);
+                        }
+                    }
                     $(
                         if let Err(p) = ::std::panic::catch_unwind(
                             ::std::panic::AssertUnwindSafe(|| $blocks)