File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2716,14 +2716,16 @@ impl Location {
2716
2716
return true ;
2717
2717
}
2718
2718
2719
+ let predecessors = body. predecessors ( ) ;
2720
+
2719
2721
// If we're in another block, then we want to check that block is a predecessor of `other`.
2720
- let mut queue: Vec < BasicBlock > = body . predecessors_for ( other. block ) . to_vec ( ) ;
2722
+ let mut queue: Vec < BasicBlock > = predecessors [ other. block ] . to_vec ( ) ;
2721
2723
let mut visited = FxHashSet :: default ( ) ;
2722
2724
2723
2725
while let Some ( block) = queue. pop ( ) {
2724
2726
// If we haven't visited this block before, then make sure we visit it's predecessors.
2725
2727
if visited. insert ( block) {
2726
- queue. extend ( body . predecessors_for ( block) . iter ( ) . cloned ( ) ) ;
2728
+ queue. extend ( predecessors [ block] . iter ( ) . cloned ( ) ) ;
2727
2729
} else {
2728
2730
continue ;
2729
2731
}
You can’t perform that action at this time.
0 commit comments