Closed
Description
This may be the same bug as #18060. This code
fn main() {
// ok
match (1, 0) {
(0, 0...1) |
(1, 0...0) => Ok(()),
_ => Err(())
}.unwrap();
// error
match (1, 0) {
(0, 0...1) | // <-- endpoint of first range must be greater than that of the second one
(1, 0...0) => Ok(()),
(_, _) => Err(()) // <-- must be a tuple of _
}.unwrap();
}
gets the second match wrong somehow, under very specific circumstances. Minified from user "bellows" in #rust-beginners.
Metadata
Metadata
Assignees
Labels
No labels