diff options
| author | bors <bors@rust-lang.org> | 2023-03-09 08:21:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-09 08:21:17 +0000 |
| commit | 39f2657d1101b50f9b71ae460b762d330cc8426b (patch) | |
| tree | fa6be23bc0b0eed8b13d48d5200ad8c445ec69fa /compiler/rustc_mir_transform/src/inline.rs | |
| parent | 66a2d6221069e0d08ceacf2a3201600e2092d2e0 (diff) | |
| parent | a22c5f9581cc0691be6838ee2a16ab4bd8af9a0b (diff) | |
| download | rust-39f2657d1101b50f9b71ae460b762d330cc8426b.tar.gz rust-39f2657d1101b50f9b71ae460b762d330cc8426b.zip | |
Auto merge of #108920 - matthiaskrgr:rollup-qrr9a0u, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous) - #108759 (1.41.1 supported 32-bit Apple targets) - #108839 (Canonicalize root var when making response from new solver) - #108856 (Remove DropAndReplace terminator) - #108882 (Tweak E0740) - #108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap) - #108911 (Improve rustdoc-gui/tester.js code a bit) - #108916 (Remove an unused return value in `rustc_hir_typeck`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src/inline.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index 6e6d6566f4b..9cba8870f23 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -453,9 +453,7 @@ impl<'tcx> Inliner<'tcx> { checker.visit_basic_block_data(bb, blk); let term = blk.terminator(); - if let TerminatorKind::Drop { ref place, target, unwind } - | TerminatorKind::DropAndReplace { ref place, target, unwind, .. } = term.kind - { + if let TerminatorKind::Drop { ref place, target, unwind } = term.kind { work_list.push(target); // If the place doesn't actually need dropping, treat it like a regular goto. @@ -815,8 +813,7 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> { fn visit_terminator(&mut self, terminator: &Terminator<'tcx>, location: Location) { let tcx = self.tcx; match terminator.kind { - TerminatorKind::Drop { ref place, unwind, .. } - | TerminatorKind::DropAndReplace { ref place, unwind, .. } => { + TerminatorKind::Drop { ref place, unwind, .. } => { // If the place doesn't actually need dropping, treat it like a regular goto. let ty = self.instance.subst_mir(tcx, &place.ty(self.callee_body, tcx).ty); if ty.needs_drop(tcx, self.param_env) { @@ -1120,8 +1117,7 @@ impl<'tcx> MutVisitor<'tcx> for Integrator<'_, 'tcx> { *tgt = self.map_block(*tgt); } } - TerminatorKind::Drop { ref mut target, ref mut unwind, .. } - | TerminatorKind::DropAndReplace { ref mut target, ref mut unwind, .. } => { + TerminatorKind::Drop { ref mut target, ref mut unwind, .. } => { *target = self.map_block(*target); *unwind = self.map_unwind(*unwind); } |
