You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub fn test() {
let zoom = 2;
let class = "foo";
match (zoom, class) {
(13.., "railway") => {}
(12..=13, "highway") => {}
_ => {}
}
}
warning: multiple patterns overlap on their endpoints
--> src/test.rs:7:8
|
6 | (13.., "railway") => {}
| ---- this range overlaps on `13_i32`...
7 | (12..=13, "highway") => {}
| ^^^^^^^ ... with this range
|
= note: you likely meant to write mutually exclusive ranges
But branches are mutually exclusive because of the second element in the tuple.
The code is a minimal testcase. Original code contains much more branches (ranges, classes, predicates)
The text was updated successfully, but these errors were encountered:
rustc version: rustc 1.75.0 (82e1608 2023-12-21)
relevant settings: nothing
Following code reports a warning:
But branches are mutually exclusive because of the second element in the tuple.
The code is a minimal testcase. Original code contains much more branches (ranges, classes, predicates)
The text was updated successfully, but these errors were encountered: