Reinstate some delayed bugs.
These were changed to `has_errors` assertions in #121071 because that seemed reasonable, but evidently not. Fixes #121103. Fixes #121108.
This commit is contained in:
parent
502ce8287b
commit
64a9c9cfea
6 changed files with 57 additions and 2 deletions
|
@ -265,7 +265,8 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: LocalDefId) -> ConstQualifs {
|
|||
let body = &tcx.mir_const(def).borrow();
|
||||
|
||||
if body.return_ty().references_error() {
|
||||
assert!(tcx.dcx().has_errors().is_some(), "mir_const_qualif: MIR had errors");
|
||||
// It's possible to reach here without an error being emitted (#121103).
|
||||
tcx.dcx().span_delayed_bug(body.span, "mir_const_qualif: MIR had errors");
|
||||
return Default::default();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue