File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2716,14 +2716,16 @@ impl Location {
27162716 return true ;
27172717 }
27182718
2719+ let predecessors = body. predecessors ( ) ;
2720+
27192721 // 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 ( ) ;
27212723 let mut visited = FxHashSet :: default ( ) ;
27222724
27232725 while let Some ( block) = queue. pop ( ) {
27242726 // If we haven't visited this block before, then make sure we visit it's predecessors.
27252727 if visited. insert ( block) {
2726- queue. extend ( body . predecessors_for ( block) . iter ( ) . cloned ( ) ) ;
2728+ queue. extend ( predecessors [ block] . iter ( ) . cloned ( ) ) ;
27272729 } else {
27282730 continue ;
27292731 }
You can’t perform that action at this time.
0 commit comments