Skip to content

Commit e95a739

Browse files
authored
Rollup merge of #121206 - nnethercote:top-level-error-handling, r=oli-obk
Top level error handling The interactions between the following things are surprisingly complicated: - `emit_stashed_diagnostics`, - `flush_delayed`, - normal return vs `abort_if_errors`/`FatalError.raise()` unwinding in the call to the closure in `interface::run_compiler`. This PR disentangles it all. r? `@oli-obk`
2 parents 3e52033 + 63ca4f9 commit e95a739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/miri.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
6868
queries: &'tcx rustc_interface::Queries<'tcx>,
6969
) -> Compilation {
7070
queries.global_ctxt().unwrap().enter(|tcx| {
71-
if tcx.sess.compile_status().is_err() {
71+
if tcx.sess.dcx().has_errors().is_some() {
7272
tcx.dcx().fatal("miri cannot be run on programs that fail compilation");
7373
}
7474

0 commit comments

Comments
 (0)