Auto merge of #118470 - nnethercote:cleanup-error-handlers, r=compiler-errors
Cleanup error handlers Mostly by making function naming more consistent. More to do after this, but this is enough for one PR. r? compiler-errors
This commit is contained in:
commit
2da59b8676
170 changed files with 495 additions and 517 deletions
|
@ -1201,7 +1201,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
}
|
||||
};
|
||||
self.report_error(span, error);
|
||||
self.tcx.sess.delay_span_bug(span, CG_BUG_STR);
|
||||
self.tcx.sess.span_delayed_bug(span, CG_BUG_STR);
|
||||
}
|
||||
|
||||
return Res::Err;
|
||||
|
|
|
@ -1069,7 +1069,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
if res == Res::Err || has_ambiguity_error {
|
||||
this.tcx
|
||||
.sess
|
||||
.delay_span_bug(import.span, "some error happened for an import");
|
||||
.span_delayed_bug(import.span, "some error happened for an import");
|
||||
return;
|
||||
}
|
||||
if let Ok(initial_res) = initial_res {
|
||||
|
|
|
@ -3544,7 +3544,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
|||
Res::SelfCtor(_) => {
|
||||
// We resolve `Self` in pattern position as an ident sometimes during recovery,
|
||||
// so delay a bug instead of ICEing.
|
||||
self.r.tcx.sess.delay_span_bug(
|
||||
self.r.tcx.sess.span_delayed_bug(
|
||||
ident.span,
|
||||
"unexpected `SelfCtor` in pattern, expected identifier"
|
||||
);
|
||||
|
|
|
@ -710,7 +710,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
// Make sure compilation does not succeed if preferred macro resolution
|
||||
// has changed after the macro had been expanded. In theory all such
|
||||
// situations should be reported as errors, so this is a bug.
|
||||
this.tcx.sess.delay_span_bug(span, "inconsistent resolution for a macro");
|
||||
this.tcx.sess.span_delayed_bug(span, "inconsistent resolution for a macro");
|
||||
}
|
||||
} else {
|
||||
// It's possible that the macro was unresolved (indeterminate) and silently
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue