1
Fork 0

rustc_driver: Catch ICEs on the main thread too

This commit is contained in:
Josh Stone 2018-04-09 17:30:43 -07:00
parent a9975254ee
commit 64bcbca81b

View file

@ -1526,7 +1526,8 @@ pub fn in_rustc_thread<F, R>(f: F) -> Result<R, Box<Any + Send>>
let thread = cfg.spawn(f);
thread.unwrap().join()
} else {
Ok(f())
let f = panic::AssertUnwindSafe(f);
panic::catch_unwind(f)
}
}