Convert delayed_bug
s to bug
s.
I have a suspicion that quite a few delayed bug paths are impossible to reach, so I did an experiment. I converted every `delayed_bug` to a `bug`, ran the full test suite, then converted back every `bug` that was hit. A surprising number were never hit. The next commit will convert some more back, based on human judgment.
This commit is contained in:
parent
bb594538fc
commit
010f3944e0
44 changed files with 87 additions and 157 deletions
|
@ -1615,11 +1615,7 @@ impl<'tcx> MirPass<'tcx> for StateTransform {
|
|||
(args.discr_ty(tcx), coroutine_kind.movability() == hir::Movability::Movable)
|
||||
}
|
||||
_ => {
|
||||
tcx.dcx().span_delayed_bug(
|
||||
body.span,
|
||||
format!("unexpected coroutine type {coroutine_ty}"),
|
||||
);
|
||||
return;
|
||||
tcx.dcx().span_bug(body.span, format!("unexpected coroutine type {coroutine_ty}"));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -380,7 +380,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
|||
LookupResult::Parent(None) => {}
|
||||
LookupResult::Parent(Some(_)) => {
|
||||
if !replace {
|
||||
self.tcx.dcx().span_delayed_bug(
|
||||
self.tcx.dcx().span_bug(
|
||||
terminator.source_info.span,
|
||||
format!("drop of untracked value {bb:?}"),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue