Skip to content

Commit 8e266d9

Browse files
committed
Preserve caches in a call to shrink_to_fit
1 parent 6f935a0 commit 8e266d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/simplify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub(super) fn simplify_cfg<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
8282
remove_dead_blocks(body);
8383

8484
// FIXME: Should probably be moved into some kind of pass manager
85-
body.basic_blocks_mut().raw.shrink_to_fit();
85+
body.basic_blocks.as_mut_preserves_cfg().shrink_to_fit();
8686
}
8787

8888
impl<'tcx> crate::MirPass<'tcx> for SimplifyCfg {

0 commit comments

Comments
 (0)