diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-05-27 13:38:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-27 13:38:31 +0200 |
| commit | ddb5424569b1d598adf9010cece8d49968c357e6 (patch) | |
| tree | 4efdcfc21f8555404bad0293057723e21e8c0412 /compiler/rustc_mir_transform/src/inline.rs | |
| parent | 859068c628cb14622c58aa5d05959530b05ffee1 (diff) | |
| parent | 844c1cc5fec38f691a2ffb53ef3366f25cf7b02b (diff) | |
| download | rust-ddb5424569b1d598adf9010cece8d49968c357e6.tar.gz rust-ddb5424569b1d598adf9010cece8d49968c357e6.zip | |
Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin
Remove DesugaringKind::Replace. A simple boolean flag is enough.
Diffstat (limited to 'compiler/rustc_mir_transform/src/inline.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs index 1748b1bf4a0..ca1e209d504 100644 --- a/compiler/rustc_mir_transform/src/inline.rs +++ b/compiler/rustc_mir_transform/src/inline.rs @@ -449,7 +449,7 @@ impl<'tcx> Inliner<'tcx> { checker.visit_basic_block_data(bb, blk); let term = blk.terminator(); - if let TerminatorKind::Drop { ref place, target, unwind } = term.kind { + if let TerminatorKind::Drop { ref place, target, unwind, replace: _ } = term.kind { work_list.push(target); // If the place doesn't actually need dropping, treat it like a regular goto. @@ -457,8 +457,8 @@ impl<'tcx> Inliner<'tcx> { .callee .subst_mir(self.tcx, ty::EarlyBinder(&place.ty(callee_body, tcx).ty)); if ty.needs_drop(tcx, self.param_env) && let UnwindAction::Cleanup(unwind) = unwind { - work_list.push(unwind); - } + work_list.push(unwind); + } } else if callee_attrs.instruction_set != self.codegen_fn_attrs.instruction_set && matches!(term.kind, TerminatorKind::InlineAsm { .. }) { |
