]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_transform/src/deaggregator.rs
Auto merge of #95685 - oxidecomputer:restore-static-dwarf, r=pnkfelix
[rust.git] / compiler / rustc_mir_transform / src / deaggregator.rs
index 616ba819982ec981807f591f906b95e9c5c4c28e..b93fe5879f4fd99a7bc388bf008cb2465b3f4c0f 100644 (file)
@@ -11,8 +11,7 @@ fn phase_change(&self) -> Option<MirPhase> {
     }
 
     fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
-        let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut();
-        let local_decls = &*local_decls;
+        let basic_blocks = body.basic_blocks.as_mut_preserves_cfg();
         for bb in basic_blocks {
             bb.expand_statements(|stmt| {
                 // FIXME(eddyb) don't match twice on `stmt.kind` (post-NLL).
@@ -37,7 +36,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
                 Some(expand_aggregate(
                     lhs,
                     operands.into_iter().map(|op| {
-                        let ty = op.ty(local_decls, tcx);
+                        let ty = op.ty(&body.local_decls, tcx);
                         (op, ty)
                     }),
                     *kind,