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:
@@ -3681,13 +3681,13 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
||||
None
|
||||
}
|
||||
Res::SelfCtor(_) => {
|
||||
// njn: remove comment?
|
||||
// We resolve `Self` in pattern position as an ident sometimes during recovery,
|
||||
// so delay a bug instead of ICEing.
|
||||
self.r.dcx().span_delayed_bug(
|
||||
self.r.dcx().span_bug(
|
||||
ident.span,
|
||||
"unexpected `SelfCtor` in pattern, expected identifier"
|
||||
);
|
||||
None
|
||||
}
|
||||
_ => span_bug!(
|
||||
ident.span,
|
||||
|
||||
Reference in New Issue
Block a user