about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2025-03-05 23:36:47 +0100
committerTomasz Miąsko <tomasz.miasko@gmail.com>2025-03-06 00:23:15 +0100
commit508b803c44e4df10fe189e8d1ae3a551ade9b2da (patch)
tree02401ba0ac9a902c7771f51f4bf141029d0b4900 /compiler/rustc_mir_transform/src
parent30f168ef811aec63124eac677e14699baa9395bd (diff)
downloadrust-508b803c44e4df10fe189e8d1ae3a551ade9b2da.tar.gz
rust-508b803c44e4df10fe189e8d1ae3a551ade9b2da.zip
Remove start block special case
Edges to the start block are invalid. The special case is unnecessary.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/add_call_guards.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/add_call_guards.rs b/compiler/rustc_mir_transform/src/add_call_guards.rs
index 55694cacd92..f9e757dda43 100644
--- a/compiler/rustc_mir_transform/src/add_call_guards.rs
+++ b/compiler/rustc_mir_transform/src/add_call_guards.rs
@@ -34,7 +34,6 @@ impl<'tcx> crate::MirPass<'tcx> for AddCallGuards {
     fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
         let mut pred_count: IndexVec<_, _> =
             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
         let mut new_blocks = Vec::new();