]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_mir_transform/src/add_call_guards.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / compiler / rustc_mir_transform / src / add_call_guards.rs
index 10d522717344dcd7ef8d4d7dec769d49095e78f8..f12c8560c0e82bd0a3d041dc4d8ce3b8e314628b 100644 (file)
@@ -39,7 +39,7 @@ impl<'tcx> MirPass<'tcx> for AddCallGuards {
 impl AddCallGuards {
     pub fn add_call_guards(&self, body: &mut Body<'_>) {
         let mut pred_count: IndexVec<_, _> =
-            body.predecessors().iter().map(|ps| ps.len()).collect();
+            body.basic_blocks.predecessors().iter().map(|ps| ps.len()).collect();
         pred_count[START_BLOCK] += 1;
 
         // We need a place to store the new blocks generated