@@ -1077,35 +1077,20 @@ impl<'tcx> IntRange<'tcx> {
10771077 }
10781078
10791079 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-
10831080 // `false` in the following cases:
1084- // 1 ----
1085- // 2 ----------
1086- //
1087- // 1 ----------
1088- // 2 ----
1081+ // 1 ---- // 1 ---------- // 1 ---- // 1 ----
1082+ // 2 ---------- // 2 ---- // 2 ---- // 2 ----
10891083 //
1090- // 1 ----
1091- // 2 ----
1084+ // The following are currently `false`, but could be `true` in the future (#64007):
1085+ // 1 --------- // 1 ---------
1086+ // 2 ---------- // 2 ----------
10921087 //
1093- // 1 ----
1094- // 2 ----
1095-
10961088 // `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)
11091094 }
11101095}
11111096
0 commit comments