]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_transform/src/early_otherwise_branch.rs
Rollup merge of #101864 - notriddle:notriddle/h1-h2-h3-h4, r=GuillaumeGomez
[rust.git] / compiler / rustc_mir_transform / src / early_otherwise_branch.rs
index dba42f7aff0338fb94bad384a67778530da4ff7e..32e738bbcea44b108c47e2dd948cef4f242dbbdb 100644 (file)
@@ -104,8 +104,8 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
         let mut should_cleanup = false;
 
         // Also consider newly generated bbs in the same pass
-        for i in 0..body.basic_blocks().len() {
-            let bbs = body.basic_blocks();
+        for i in 0..body.basic_blocks.len() {
+            let bbs = &*body.basic_blocks;
             let parent = BasicBlock::from_usize(i);
             let Some(opt_data) = evaluate_candidate(tcx, body, parent) else {
                 continue
@@ -316,7 +316,7 @@ fn evaluate_candidate<'tcx>(
     body: &Body<'tcx>,
     parent: BasicBlock,
 ) -> Option<OptimizationData<'tcx>> {
-    let bbs = body.basic_blocks();
+    let bbs = &body.basic_blocks;
     let TerminatorKind::SwitchInt {
         targets,
         switch_ty: parent_ty,