Rollup merge of #121208 - nnethercote:delayed_bug-to-bug, r=lcnr
Convert `delayed_bug`s to `bug`s. I have a suspicion that quite a few delayed bug paths are impossible to reach, so I did an experiment. I converted every `delayed_bug` to a `bug`, ran the full test suite, then converted back every `bug` that was hit. A surprising number were never hit. This is too dangerous to merge. Increased coverage (fuzzing or a crater run) would likely hit more cases. But it might be useful for people to look at and think about which paths are genuinely unreachable. r? `@ghost`
This commit is contained in:
commit
d5206c6ecd
39 changed files with 130 additions and 155 deletions
|
@ -420,11 +420,9 @@ where
|
|||
match b.kind() {
|
||||
ty::ConstKind::Infer(InferConst::Var(_)) if D::forbid_inference_vars() => {
|
||||
// Forbid inference variables in the RHS.
|
||||
self.infcx.dcx().span_delayed_bug(
|
||||
self.delegate.span(),
|
||||
format!("unexpected inference var {b:?}",),
|
||||
);
|
||||
Ok(a)
|
||||
self.infcx
|
||||
.dcx()
|
||||
.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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue