Closed
Description
Code
match (0i8, 0i8) {
(0, _) => {}
// change either of these to not overlap and it will error
(..=-1, ..=0) => {}
(1.., 0..) => {}
(1.., ..=-1) | (..=-1, 1..) => {}
}
Current output
warning: multiple patterns overlap on their endpoints
--> src/main.rs:6:15
|
5 | (..=-1, ..=0) => {}
| ---- this range overlaps on `0_i8`...
6 | (1.., 0..) => {}
| ^^^ ... with this range
|
= note: you likely meant to write mutually exclusive ranges
= note: `#[warn(overlapping_range_endpoints)]` on by default
Desired output
no output, pattern is exhaustive. addressing the warning causes an error as it is no longer exhaustive.
Rationale and extra context
No response
Other cases
No response
Anything else?
this is only occurring on nightly (at least as of 2023-11-01, i haven't tested anything sooner)