diff --git a/compiler/rustc_mir_transform/src/ssa.rs b/compiler/rustc_mir_transform/src/ssa.rs index cd9a7f4a39dfe..1ca1fcd29fc03 100644 --- a/compiler/rustc_mir_transform/src/ssa.rs +++ b/compiler/rustc_mir_transform/src/ssa.rs @@ -256,12 +256,12 @@ impl<'tcx> Visitor<'tcx> for SsaVisitor<'_, 'tcx> { } PlaceContext::MutatingUse(MutatingUseContext::Call) => { let call = loc.block; - let TerminatorKind::Call { target, .. } = + let TerminatorKind::Call { target: Some(target), .. } = self.body.basic_blocks[call].terminator().kind else { - bug!() + return; }; - Some(DefLocation::CallReturn { call, target }) + Some(DefLocation::CallReturn { call, target: Some(target) }) } _ => None, };