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
|
@ -242,7 +242,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
|
|||
let assigned_ty = place.ty(&self.body.local_decls, self.tcx).ty;
|
||||
if assigned_ty.needs_drop(self.tcx, self.param_env) {
|
||||
// This would be unsafe, but should be outright impossible since we reject such unions.
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.sess.span_delayed_bug(
|
||||
self.source_info.span,
|
||||
format!("union fields that need dropping should be impossible: {assigned_ty}")
|
||||
);
|
||||
|
|
|
@ -1510,8 +1510,10 @@ impl<'tcx> MirPass<'tcx> for StateTransform {
|
|||
(args.discr_ty(tcx), movability == hir::Movability::Movable)
|
||||
}
|
||||
_ => {
|
||||
tcx.sess
|
||||
.delay_span_bug(body.span, format!("unexpected coroutine type {coroutine_ty}"));
|
||||
tcx.sess.span_delayed_bug(
|
||||
body.span,
|
||||
format!("unexpected coroutine type {coroutine_ty}"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -316,7 +316,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
|||
self.init_data.seek_before(self.body.terminator_loc(bb));
|
||||
let (_maybe_live, maybe_dead) = self.init_data.maybe_live_dead(parent);
|
||||
if maybe_dead {
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.sess.span_delayed_bug(
|
||||
terminator.source_info.span,
|
||||
format!(
|
||||
"drop of untracked, uninitialized value {bb:?}, place {place:?} ({path:?})"
|
||||
|
@ -381,7 +381,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
|||
LookupResult::Parent(None) => {}
|
||||
LookupResult::Parent(Some(_)) => {
|
||||
if !replace {
|
||||
self.tcx.sess.delay_span_bug(
|
||||
self.tcx.sess.span_delayed_bug(
|
||||
terminator.source_info.span,
|
||||
format!("drop of untracked value {bb:?}"),
|
||||
);
|
||||
|
|
|
@ -266,7 +266,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: LocalDefId) -> ConstQualifs {
|
|||
let body = &tcx.mir_const(def).borrow();
|
||||
|
||||
if body.return_ty().references_error() {
|
||||
tcx.sess.delay_span_bug(body.span, "mir_const_qualif: MIR had errors");
|
||||
tcx.sess.span_delayed_bug(body.span, "mir_const_qualif: MIR had errors");
|
||||
return Default::default();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue