Skip to content

Commit 64bcbca

Browse files
committed
rustc_driver: Catch ICEs on the main thread too
1 parent a997525 commit 64bcbca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_driver/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,8 @@ pub fn in_rustc_thread<F, R>(f: F) -> Result<R, Box<Any + Send>>
15261526
let thread = cfg.spawn(f);
15271527
thread.unwrap().join()
15281528
} else {
1529-
Ok(f())
1529+
let f = panic::AssertUnwindSafe(f);
1530+
panic::catch_unwind(f)
15301531
}
15311532
}
15321533

0 commit comments

Comments
 (0)