Convert delayed_bugs to bugs.
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. The next commit will convert some more back, based on human judgment.
This commit is contained in:
@@ -82,7 +82,7 @@ where
|
||||
let value = infcx.commit_if_ok(|_| {
|
||||
let ocx = ObligationCtxt::new(infcx);
|
||||
let value = op(&ocx).map_err(|_| {
|
||||
infcx.dcx().span_delayed_bug(span, format!("error performing operation: {name}"))
|
||||
infcx.dcx().span_bug(span, format!("error performing operation: {name}"))
|
||||
})?;
|
||||
let errors = ocx.select_all_or_error();
|
||||
if errors.is_empty() {
|
||||
|
||||
@@ -190,10 +190,9 @@ where
|
||||
}
|
||||
}
|
||||
if !progress {
|
||||
return Err(infcx.dcx().span_delayed_bug(
|
||||
span,
|
||||
format!("ambiguity processing {obligations:?} from {self:?}"),
|
||||
));
|
||||
infcx
|
||||
.dcx()
|
||||
.span_bug(span, format!("ambiguity processing {obligations:?} from {self:?}"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user