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
|
@ -194,8 +194,8 @@ impl CanonicalizeMode for CanonicalizeQueryResponse {
|
|||
//
|
||||
// rust-lang/rust#57464: `impl Trait` can leak local
|
||||
// scopes (in manner violating typeck). Therefore, use
|
||||
// `delay_span_bug` to allow type error over an ICE.
|
||||
canonicalizer.tcx.sess.delay_span_bug(
|
||||
// `span_delayed_bug` to allow type error over an ICE.
|
||||
canonicalizer.tcx.sess.span_delayed_bug(
|
||||
rustc_span::DUMMY_SP,
|
||||
format!("unexpected region in query response: `{r:?}`"),
|
||||
);
|
||||
|
|
|
@ -175,7 +175,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
&mut OriginalQueryValues::default(),
|
||||
);
|
||||
self.tcx.check_tys_might_be_eq(canonical).map_err(|_| {
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("cannot relate consts of different types (a={a:?}, b={b:?})",),
|
||||
)
|
||||
|
|
|
@ -517,7 +517,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
|
||||
self.tcx
|
||||
.sess
|
||||
.delay_span_bug(self.tcx.def_span(generic_param_scope), "expected region errors")
|
||||
.span_delayed_bug(self.tcx.def_span(generic_param_scope), "expected region errors")
|
||||
}
|
||||
|
||||
// This method goes through all the errors and try to group certain types
|
||||
|
|
|
@ -798,7 +798,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
|
|||
|
||||
// Errors in earlier passes can yield error variables without
|
||||
// resolution errors here; delay ICE in favor of those errors.
|
||||
self.tcx().sess.delay_span_bug(
|
||||
self.tcx().sess.span_delayed_bug(
|
||||
self.var_infos[node_idx].origin.span(),
|
||||
format!(
|
||||
"collect_error_for_expanding_node() could not find \
|
||||
|
|
|
@ -1433,7 +1433,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
let guar = self
|
||||
.tcx
|
||||
.sess
|
||||
.delay_span_bug(DUMMY_SP, format!("`{value:?}` is not fully resolved"));
|
||||
.span_delayed_bug(DUMMY_SP, format!("`{value:?}` is not fully resolved"));
|
||||
Ok(self.tcx.fold_regions(value, |re, _| {
|
||||
if re.is_var() { ty::Region::new_error(self.tcx, guar) } else { re }
|
||||
}))
|
||||
|
|
|
@ -494,7 +494,7 @@ where
|
|||
// shouldn't ever fail. Instead, it unconditionally emits an
|
||||
// alias-relate goal.
|
||||
assert!(!self.infcx.next_trait_solver());
|
||||
self.tcx().sess.delay_span_bug(
|
||||
self.tcx().sess.span_delayed_bug(
|
||||
self.delegate.span(),
|
||||
"failure to relate an opaque to itself should result in an error later on",
|
||||
);
|
||||
|
@ -552,7 +552,7 @@ where
|
|||
match b.kind() {
|
||||
ty::ConstKind::Infer(InferConst::Var(_)) if D::forbid_inference_vars() => {
|
||||
// Forbid inference variables in the RHS.
|
||||
self.infcx.tcx.sess.delay_span_bug(
|
||||
self.infcx.tcx.sess.span_delayed_bug(
|
||||
self.delegate.span(),
|
||||
format!("unexpected inference var {b:?}",),
|
||||
);
|
||||
|
|
|
@ -41,7 +41,7 @@ impl<'tcx> Drop for OpaqueTypeStorage<'tcx> {
|
|||
fn drop(&mut self) {
|
||||
if !self.opaque_types.is_empty() {
|
||||
ty::tls::with(|tcx| {
|
||||
tcx.sess.delay_span_bug(DUMMY_SP, format!("{:?}", self.opaque_types))
|
||||
tcx.sess.span_delayed_bug(DUMMY_SP, format!("{:?}", self.opaque_types))
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ where
|
|||
// ignore this, we presume it will yield an error
|
||||
// later, since if a type variable is not resolved by
|
||||
// this point it never will be
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.sess.span_delayed_bug(
|
||||
origin.span(),
|
||||
format!("unresolved inference variable in outlives: {v:?}"),
|
||||
);
|
||||
|
|
|
@ -180,7 +180,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
|
|||
// ignore this, we presume it will yield an error
|
||||
// later, since if a type variable is not resolved by
|
||||
// this point it never will be
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.sess.span_delayed_bug(
|
||||
rustc_span::DUMMY_SP,
|
||||
format!("unresolved inference variable in outlives: {v:?}"),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue