Skip to content

Commit 5126465

Browse files
committed
Enable creating backtraces via -Ztreat-err-as-bug when stashing errors
1 parent 1b2c53a commit 5126465

File tree

1 file changed

+1
-7
lines changed
  • compiler/rustc_errors/src

1 file changed

+1
-7
lines changed

compiler/rustc_errors/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -768,13 +768,7 @@ impl DiagCtxt {
768768
format!("invalid level in `stash_diagnostic`: {:?}", diag.level),
769769
);
770770
}
771-
Error => {
772-
// This `unchecked_error_guaranteed` is valid. It is where the
773-
// `ErrorGuaranteed` for stashed errors originates. See
774-
// `DiagCtxtInner::drop`.
775-
#[allow(deprecated)]
776-
Some(ErrorGuaranteed::unchecked_error_guaranteed())
777-
}
771+
Error => Some(self.span_delayed_bug(span, "stashing {key:?}")),
778772
DelayedBug => return self.inner.borrow_mut().emit_diagnostic(diag),
779773
ForceWarning(_) | Warning | Note | OnceNote | Help | OnceHelp | FailureNote | Allow
780774
| Expect(_) => None,

0 commit comments

Comments
 (0)