Skip to content

Commit b669e2e

Browse files
Rollup merge of #121669 - nnethercote:count-stashed-errs-again, r=estebank
Count stashed errors again Stashed diagnostics are such a pain. Their "might be emitted, might not" semantics messes with lots of things. #120828 and #121206 made some big changes to how they work, improving some things, but still leaving some problems, as seen by the issues caused by #121206. This PR aims to fix all of them by restricting them in a way that eliminates the "might be emitted, might not" semantics while still allowing 98% of their benefit. Details in the individual commit logs. r? `@oli-obk`
2 parents ace01c8 + 51eea0a commit b669e2e

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.dcx().has_errors().is_some() {
71+
if tcx.sess.dcx().has_errors_or_delayed_bugs().is_some() {
7272
tcx.dcx().fatal("miri cannot be run on programs that fail compilation");
7373
}
7474

0 commit comments

Comments
 (0)