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:
parent
57d6f840b9
commit
5d1d384443
131 changed files with 309 additions and 278 deletions
|
@ -327,7 +327,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
),
|
||||
ExprKind::Yield(opt_expr) => self.lower_expr_yield(e.span, opt_expr.as_deref()),
|
||||
ExprKind::Err => hir::ExprKind::Err(
|
||||
self.tcx.sess.delay_span_bug(e.span, "lowered ExprKind::Err"),
|
||||
self.tcx.sess.span_delayed_bug(e.span, "lowered ExprKind::Err"),
|
||||
),
|
||||
ExprKind::Try(sub_expr) => self.lower_expr_try(e.span, sub_expr),
|
||||
|
||||
|
@ -799,7 +799,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
self.expr_ident_mut(span, task_context_ident, task_context_hid)
|
||||
} else {
|
||||
// Use of `await` outside of an async context, we cannot use `task_context` here.
|
||||
self.expr_err(span, self.tcx.sess.delay_span_bug(span, "no task_context hir id"))
|
||||
self.expr_err(span, self.tcx.sess.span_delayed_bug(span, "no task_context hir id"))
|
||||
};
|
||||
let new_unchecked = self.expr_call_lang_item_fn_mut(
|
||||
span,
|
||||
|
|
|
@ -267,7 +267,7 @@ fn make_count<'hir>(
|
|||
ctx.expr(
|
||||
sp,
|
||||
hir::ExprKind::Err(
|
||||
ctx.tcx.sess.delay_span_bug(sp, "lowered bad format_args count"),
|
||||
ctx.tcx.sess.span_delayed_bug(sp, "lowered bad format_args count"),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ fn make_format_spec<'hir>(
|
|||
}
|
||||
Err(_) => ctx.expr(
|
||||
sp,
|
||||
hir::ExprKind::Err(ctx.tcx.sess.delay_span_bug(sp, "lowered bad format_args count")),
|
||||
hir::ExprKind::Err(ctx.tcx.sess.span_delayed_bug(sp, "lowered bad format_args count")),
|
||||
),
|
||||
};
|
||||
let &FormatOptions {
|
||||
|
|
|
@ -256,7 +256,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
&ImplTraitContext::Disallowed(ImplTraitPosition::Generic),
|
||||
|this| match ty {
|
||||
None => {
|
||||
let guar = this.tcx.sess.delay_span_bug(
|
||||
let guar = this.tcx.sess.span_delayed_bug(
|
||||
span,
|
||||
"expected to lower type alias type, but it was missing",
|
||||
);
|
||||
|
@ -863,7 +863,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
&ImplTraitContext::Disallowed(ImplTraitPosition::Generic),
|
||||
|this| match ty {
|
||||
None => {
|
||||
let guar = this.tcx.sess.delay_span_bug(
|
||||
let guar = this.tcx.sess.span_delayed_bug(
|
||||
i.span,
|
||||
"expected to lower associated type, but it was missing",
|
||||
);
|
||||
|
@ -996,7 +996,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
fn lower_block_expr_opt(&mut self, span: Span, block: Option<&Block>) -> hir::Expr<'hir> {
|
||||
match block {
|
||||
Some(block) => self.lower_block_expr(block),
|
||||
None => self.expr_err(span, self.tcx.sess.delay_span_bug(span, "no block")),
|
||||
None => self.expr_err(span, self.tcx.sess.span_delayed_bug(span, "no block")),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
&[],
|
||||
match expr {
|
||||
Some(expr) => this.lower_expr_mut(expr),
|
||||
None => this.expr_err(span, this.tcx.sess.delay_span_bug(span, "no block")),
|
||||
None => this.expr_err(span, this.tcx.sess.span_delayed_bug(span, "no block")),
|
||||
},
|
||||
)
|
||||
})
|
||||
|
|
|
@ -1326,7 +1326,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
let kind = match &t.kind {
|
||||
TyKind::Infer => hir::TyKind::Infer,
|
||||
TyKind::Err => {
|
||||
hir::TyKind::Err(self.tcx.sess.delay_span_bug(t.span, "TyKind::Err lowered"))
|
||||
hir::TyKind::Err(self.tcx.sess.span_delayed_bug(t.span, "TyKind::Err lowered"))
|
||||
}
|
||||
// FIXME(unnamed_fields): IMPLEMENTATION IN PROGRESS
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
|
@ -1510,7 +1510,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
}
|
||||
TyKind::MacCall(_) => panic!("`TyKind::MacCall` should have been expanded by now"),
|
||||
TyKind::CVarArgs => {
|
||||
let guar = self.tcx.sess.delay_span_bug(
|
||||
let guar = self.tcx.sess.span_delayed_bug(
|
||||
t.span,
|
||||
"`TyKind::CVarArgs` should have been handled elsewhere",
|
||||
);
|
||||
|
@ -1653,7 +1653,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
} else {
|
||||
self.tcx
|
||||
.sess
|
||||
.delay_span_bug(lifetime.ident.span, "no def-id for fresh lifetime");
|
||||
.span_delayed_bug(lifetime.ident.span, "no def-id for fresh lifetime");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -2515,9 +2515,10 @@ impl<'hir> GenericArgsCtor<'hir> {
|
|||
let hir_id = lcx.next_id();
|
||||
|
||||
let Some(host_param_id) = lcx.host_param_id else {
|
||||
lcx.tcx
|
||||
.sess
|
||||
.delay_span_bug(span, "no host param id for call in const yet no errors reported");
|
||||
lcx.tcx.sess.span_delayed_bug(
|
||||
span,
|
||||
"no host param id for call in const yet no errors reported",
|
||||
);
|
||||
return;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue