diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2025-06-18 16:12:42 +0200 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2025-06-18 16:16:45 +0200 |
| commit | 8e266d999d47e40cc7e90fba5d1ea9a581fd5175 (patch) | |
| tree | c404dc8897c2e5e2aca6a06c4f2e659bfc825b2a | |
| parent | 6f935a044d1ddeb6160494a6320d008d7c311aef (diff) | |
| download | rust-8e266d999d47e40cc7e90fba5d1ea9a581fd5175.tar.gz rust-8e266d999d47e40cc7e90fba5d1ea9a581fd5175.zip | |
Preserve caches in a call to shrink_to_fit
| -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 { |
