@@ -1077,35 +1077,20 @@ impl<'tcx> IntRange<'tcx> {
1077
1077
}
1078
1078
1079
1079
fn suspicious_intersection ( & self , other : & Self ) -> bool {
1080
- let ( lo, hi) = ( * self . range . start ( ) , * self . range . end ( ) ) ;
1081
- let ( other_lo, other_hi) = ( * other. range . start ( ) , * other. range . end ( ) ) ;
1082
-
1083
1080
// `false` in the following cases:
1084
- // 1 ----
1085
- // 2 ----------
1086
- //
1087
- // 1 ----------
1088
- // 2 ----
1081
+ // 1 ---- // 1 ---------- // 1 ---- // 1 ----
1082
+ // 2 ---------- // 2 ---- // 2 ---- // 2 ----
1089
1083
//
1090
- // 1 ----
1091
- // 2 ----
1084
+ // The following are currently `false`, but could be `true` in the future (#64007):
1085
+ // 1 --------- // 1 ---------
1086
+ // 2 ---------- // 2 ----------
1092
1087
//
1093
- // 1 ----
1094
- // 2 ----
1095
-
1096
1088
// `true` in the following cases:
1097
- // 1 ---------
1098
- // 2 ----------
1099
- lo < other_lo && hi > other_lo && hi < other_hi ||
1100
- // 1 ---------
1101
- // 2 ----------
1102
- lo > other_lo && lo < other_hi && hi > other_hi ||
1103
- // 1 ----
1104
- // 2 ----
1105
- lo == other_hi && other_lo < lo ||
1106
- // 1 ----
1107
- // 2 -----
1108
- hi == other_lo && lo < other_lo
1089
+ // 1 ------- // 1 -------
1090
+ // 2 -------- // 2 -------
1091
+ let ( lo, hi) = ( * self . range . start ( ) , * self . range . end ( ) ) ;
1092
+ let ( other_lo, other_hi) = ( * other. range . start ( ) , * other. range . end ( ) ) ;
1093
+ ( lo == other_hi || hi == other_lo)
1109
1094
}
1110
1095
}
1111
1096
0 commit comments