diff options
| author | bors <bors@rust-lang.org> | 2024-01-23 20:43:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-23 20:43:38 +0000 |
| commit | 5d3d3479d774754856db2db3e439dfb88ef3c52f (patch) | |
| tree | c1fb20b5e72855a5a638b349d6c69ba76ae1a0fd /compiler/rustc_mir_transform | |
| parent | dfe53afaebd817f334d8ef9dc75a5cd2562cf6e6 (diff) | |
| parent | 08bac31f8f95a9cf2bdcbecfb65ca8de5b644699 (diff) | |
| download | rust-5d3d3479d774754856db2db3e439dfb88ef3c52f.tar.gz rust-5d3d3479d774754856db2db3e439dfb88ef3c52f.zip | |
Auto merge of #120281 - fmease:rollup-9nxail8, r=fmease
Rollup of 10 pull requests Successful merges: - #119028 (Add more weirdness to weird-exprs.rs) - #119805 (Suggest array::from_fn for array initialization) - #120188 (compiler: update freebsd and netbsd base specs.) - #120215 (Update some deps with `bitflags` v1 dependencies) - #120244 (Use `Self` in `NonZero*` implementations.) - #120246 (Re-add estebank to review rotation) - #120252 (rename `RawTy` to `LoweredTy`) - #120255 (correct my mailmap entry) - #120270 (A bunch of random modifications) - #120280 (Move condition enabling the pass to `is_enabled`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/remove_storage_markers.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_mir_transform/src/remove_storage_markers.rs b/compiler/rustc_mir_transform/src/remove_storage_markers.rs index 795f5232ee3..f68e592db15 100644 --- a/compiler/rustc_mir_transform/src/remove_storage_markers.rs +++ b/compiler/rustc_mir_transform/src/remove_storage_markers.rs @@ -7,14 +7,10 @@ pub struct RemoveStorageMarkers; impl<'tcx> MirPass<'tcx> for RemoveStorageMarkers { fn is_enabled(&self, sess: &rustc_session::Session) -> bool { - sess.mir_opt_level() > 0 + sess.mir_opt_level() > 0 && !sess.emit_lifetime_markers() } - fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { - if tcx.sess.emit_lifetime_markers() { - return; - } - + fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { trace!("Running RemoveStorageMarkers on {:?}", body.source); for data in body.basic_blocks.as_mut_preserves_cfg() { data.statements.retain(|statement| match statement.kind { |
