Closed
Description
Hello, the pattern matching in match arms seems to have different behavior in stable than in beta/nightly.
I tried this code:
use std::i8;
fn main() {
let a = Some(-50_i8);
match a {
Some(c @ i8::MIN...-101) | Some(c @ 101...i8::MAX) => println!("out of bounds, {}", c),
_ => println!("OK"),
}
}
I expected to see this happen: In all chains, it should print "OK".
Instead, this happened: It prints "OK" in stable, but it prints "out of bounds, -50" in beta/nightly.
I understand that this code is not very idiomatic, but still, I think that the behavior should be consistent between Rust versions.