File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -942,28 +942,30 @@ fn form_exhaustive_matches(left: &Pat<'_>, right: &Pat<'_>) -> bool {
942
942
) ;
943
943
let mut left_pos = left_pos. unwrap_or ( usize:: MAX ) ;
944
944
let mut right_pos = right_pos. unwrap_or ( usize:: MAX ) ;
945
- let mut left_span = 0 ;
946
- let mut right_span = 0 ;
945
+ let mut left_dot_space = 0 ;
946
+ let mut right_dot_space = 0 ;
947
947
for i in 0 ..len {
948
948
let mut found_dotdot = false ;
949
949
if i == left_pos {
950
- left_span += 1 ;
951
- if left_span < len - left_in. len ( ) {
950
+ left_dot_space += 1 ;
951
+ if left_dot_space < len - left_in. len ( ) {
952
952
left_pos += 1 ;
953
953
}
954
954
found_dotdot = true ;
955
955
}
956
956
if i == right_pos {
957
- right_span += 1 ;
958
- if right_span < len - right_in. len ( ) {
957
+ right_dot_space += 1 ;
958
+ if right_dot_space < len - right_in. len ( ) {
959
959
right_pos += 1 ;
960
960
}
961
961
found_dotdot = true ;
962
962
}
963
963
if found_dotdot {
964
964
continue ;
965
965
}
966
- if !contains_only_wilds ( & left_in[ i - left_span] ) && !contains_only_wilds ( & right_in[ i - right_span] ) {
966
+ if !contains_only_wilds ( & left_in[ i - left_dot_space] )
967
+ && !contains_only_wilds ( & right_in[ i - right_dot_space] )
968
+ {
967
969
return false ;
968
970
}
969
971
}
You can’t perform that action at this time.
0 commit comments