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:
@@ -237,7 +237,7 @@ pub fn dtorck_constraint_for_ty_inner<'tcx>(
|
||||
// By the time this code runs, all type variables ought to
|
||||
// be fully resolved.
|
||||
|
||||
tcx.sess.delay_span_bug(
|
||||
tcx.sess.span_delayed_bug(
|
||||
span,
|
||||
format!("upvar_tys for closure not found. Expected capture information for closure {ty}",),
|
||||
);
|
||||
@@ -286,7 +286,7 @@ pub fn dtorck_constraint_for_ty_inner<'tcx>(
|
||||
if !args.is_valid() {
|
||||
// By the time this code runs, all type variables ought to
|
||||
// be fully resolved.
|
||||
tcx.sess.delay_span_bug(
|
||||
tcx.sess.span_delayed_bug(
|
||||
span,
|
||||
format!("upvar_tys for coroutine not found. Expected capture information for coroutine {ty}",),
|
||||
);
|
||||
|
||||
@@ -292,7 +292,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for QueryNormalizer<'cx, 'tcx>
|
||||
// Rustdoc normalizes possibly not well-formed types, so only
|
||||
// treat this as a bug if we're not in rustdoc.
|
||||
if !tcx.sess.opts.actually_rustdoc {
|
||||
tcx.sess.delay_span_bug(
|
||||
tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("unexpected ambiguity: {c_data:?} {result:?}"),
|
||||
);
|
||||
|
||||
@@ -82,13 +82,13 @@ where
|
||||
let value = infcx.commit_if_ok(|_| {
|
||||
let ocx = ObligationCtxt::new(infcx);
|
||||
let value = op(&ocx).map_err(|_| {
|
||||
infcx.tcx.sess.delay_span_bug(span, format!("error performing operation: {name}"))
|
||||
infcx.tcx.sess.span_delayed_bug(span, format!("error performing operation: {name}"))
|
||||
})?;
|
||||
let errors = ocx.select_all_or_error();
|
||||
if errors.is_empty() {
|
||||
Ok(value)
|
||||
} else {
|
||||
Err(infcx.tcx.sess.delay_span_bug(
|
||||
Err(infcx.tcx.sess.span_delayed_bug(
|
||||
DUMMY_SP,
|
||||
format!("errors selecting obligation during MIR typeck: {errors:?}"),
|
||||
))
|
||||
|
||||
@@ -160,14 +160,14 @@ where
|
||||
let (output, error_info, mut obligations) =
|
||||
Q::fully_perform_into(self, infcx, &mut region_constraints)
|
||||
.map_err(|_| {
|
||||
infcx.tcx.sess.delay_span_bug(span, format!("error performing {self:?}"))
|
||||
infcx.tcx.sess.span_delayed_bug(span, format!("error performing {self:?}"))
|
||||
})
|
||||
.and_then(|(output, error_info, obligations, certainty)| match certainty {
|
||||
Certainty::Proven => Ok((output, error_info, obligations)),
|
||||
Certainty::Ambiguous => Err(infcx
|
||||
.tcx
|
||||
.sess
|
||||
.delay_span_bug(span, format!("ambiguity performing {self:?}"))),
|
||||
.span_delayed_bug(span, format!("ambiguity performing {self:?}"))),
|
||||
})?;
|
||||
|
||||
// Typically, instantiating NLL query results does not
|
||||
@@ -196,7 +196,7 @@ where
|
||||
}
|
||||
}
|
||||
if !progress {
|
||||
return Err(infcx.tcx.sess.delay_span_bug(
|
||||
return Err(infcx.tcx.sess.span_delayed_bug(
|
||||
span,
|
||||
format!("ambiguity processing {obligations:?} from {self:?}"),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user