Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug.

Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
This commit is contained in:
Nicholas Nethercote
2023-11-30 15:01:11 +11:00
parent 57d6f840b9
commit 5d1d384443
131 changed files with 309 additions and 278 deletions

View File

@@ -720,9 +720,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
// since we should have emitten an error for them earlier, and they will
// not be well-formed!
if polarity == ty::ImplPolarity::Negative {
self.tcx()
.sess
.delay_span_bug(binding.span, "negative trait bounds should not have bindings");
self.tcx().sess.span_delayed_bug(
binding.span,
"negative trait bounds should not have bindings",
);
continue;
}
@@ -1419,7 +1420,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
// trait reference.
let Some(trait_ref) = tcx.impl_trait_ref(impl_def_id) else {
// A cycle error occurred, most likely.
let guar = tcx.sess.delay_span_bug(span, "expected cycle error");
let guar = tcx.sess.span_delayed_bug(span, "expected cycle error");
return Err(guar);
};
@@ -2376,7 +2377,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
let e = self
.tcx()
.sess
.delay_span_bug(path.span, "path with `Res::Err` but no error emitted");
.span_delayed_bug(path.span, "path with `Res::Err` but no error emitted");
self.set_tainted_by_errors(e);
Ty::new_error(self.tcx(), e)
}