diff options
| author | bors <bors@rust-lang.org> | 2025-06-22 06:49:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-22 06:49:02 +0000 |
| commit | 9972ebfcc2b1ab322dc6611c1c997344078e05cd (patch) | |
| tree | b5eea9469fd8817df225a57ad4b01e6ff57b1c99 | |
| parent | 8051f012658fde822bfc661b52e90950b411e5c9 (diff) | |
| parent | 8e266d999d47e40cc7e90fba5d1ea9a581fd5175 (diff) | |
Auto merge of #142675 - tmiasko:preserve-cache, r=oli-obk
Preserve caches in a call to shrink_to_fit A small follow up to rust-lang/rust#142542.
| -rw-r--r-- | compiler/rustc_mir_transform/src/simplify.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/simplify.rs b/compiler/rustc_mir_transform/src/simplify.rs index a54e548ad70..db933da6413 100644 --- a/compiler/rustc_mir_transform/src/simplify.rs +++ b/compiler/rustc_mir_transform/src/simplify.rs @@ -82,7 +82,7 @@ pub(super) fn simplify_cfg<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { remove_dead_blocks(body); // FIXME: Should probably be moved into some kind of pass manager - body.basic_blocks_mut().raw.shrink_to_fit(); + body.basic_blocks.as_mut_preserves_cfg().shrink_to_fit(); } impl<'tcx> crate::MirPass<'tcx> for SimplifyCfg { |
