1
Fork 0

Convert bugs back to delayed_bugs.

This commit undoes some of the previous commit's mechanical changes,
based on human judgment.
This commit is contained in:
Nicholas Nethercote 2024-02-20 09:36:28 +11:00
parent 010f3944e0
commit 2903bbbc15
24 changed files with 87 additions and 42 deletions

View file

@ -303,7 +303,7 @@ where
// Ignore this, we presume it will yield an error later,
// since if a type variable is not resolved by this point
// it never will be.
self.tcx.dcx().span_bug(
self.tcx.dcx().span_delayed_bug(
origin.span(),
format!("unresolved inference variable in outlives: {v:?}"),
);

View file

@ -175,7 +175,11 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
// Ignore this, we presume it will yield an error later, since
// if a type variable is not resolved by this point it never
// will be.
self.tcx.dcx().bug(format!("unresolved inference variable in outlives: {v:?}"));
self.tcx
.dcx()
.delayed_bug(format!("unresolved inference variable in outlives: {v:?}"));
// Add a bound that never holds.
VerifyBound::AnyBound(vec![])
}
}
}

View file

@ -422,7 +422,7 @@ where
// Forbid inference variables in the RHS.
self.infcx
.dcx()
.span_bug(self.delegate.span(), format!("unexpected inference var {b:?}",));
.span_bug(self.delegate.span(), format!("unexpected inference var {b:?}"));
}
// FIXME(invariance): see the related FIXME above.
_ => self.infcx.super_combine_consts(self, a, b),