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

@ -3681,9 +3681,9 @@ 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.
// so delay a bug instead of ICEing. (Note: is this no longer true? We now ICE. If
// this triggers, please convert to a delayed bug and add a test.)
self.r.dcx().span_bug(
ident.span,
"unexpected `SelfCtor` in pattern, expected identifier"