about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/base.rs
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2022-07-05 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2022-08-26 14:27:08 +0200
commitb48870b451dd9d3f3f827aa54d9becdfdd811ba3 (patch)
tree3045e4c6d64ea4e45e0155d305ba7171edfe780e /compiler/rustc_codegen_cranelift/src/base.rs
parent983f4daddf238d114c4adc4751c5528fc6695a5a (diff)
downloadrust-b48870b451dd9d3f3f827aa54d9becdfdd811ba3.tar.gz
rust-b48870b451dd9d3f3f827aa54d9becdfdd811ba3.zip
Replace `Body::basic_blocks()` with field access
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/base.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/base.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs
index 44c34d6c8cb..3011813c703 100644
--- a/compiler/rustc_codegen_cranelift/src/base.rs
+++ b/compiler/rustc_codegen_cranelift/src/base.rs
@@ -73,7 +73,7 @@ pub(crate) fn codegen_fn<'tcx>(
     // Predefine blocks
     let start_block = bcx.create_block();
     let block_map: IndexVec<BasicBlock, Block> =
-        (0..mir.basic_blocks().len()).map(|_| bcx.create_block()).collect();
+        (0..mir.basic_blocks.len()).map(|_| bcx.create_block()).collect();
 
     // Make FunctionCx
     let target_config = module.target_config();
@@ -271,7 +271,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
     }
     fx.tcx.sess.time("codegen prelude", || crate::abi::codegen_fn_prelude(fx, start_block));
 
-    for (bb, bb_data) in fx.mir.basic_blocks().iter_enumerated() {
+    for (bb, bb_data) in fx.mir.basic_blocks.iter_enumerated() {
         let block = fx.get_block(bb);
         fx.bcx.switch_to_block(block);