-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in match patterns in beta #57894
Labels
P-high
High priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
sfackler
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
labels
Jan 25, 2019
Centril
added
the
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
label
Jan 25, 2019
Reduced: fn main() {
assert_eq!(false, match -50_i8 { -128i8...-101i8 => true, _ => false, });
}
// also with if-let:
fn main() {
assert_eq!(false, if let -128i8...-101i8 = -50_i8 { true } else { false });
} cc @varkor |
Centril
added
P-high
High priority
and removed
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
labels
Jan 25, 2019
Introduced between
Commits between those nightlies - indeed looks like #56695 is suspicious |
#56695 does look like the culprit. I'll try to fix this tomorrow. Thanks @jonas-schievink! |
triage: P-high. Assigned to @varkor |
bors
added a commit
that referenced
this issue
Feb 1, 2019
…oli-obk Fix bug in integer range matching Fixes #57894.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P-high
High priority
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hello, the pattern matching in match arms seems to have different behavior in stable than in beta/nightly.
I tried this code:
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.
Example in the playground
I understand that this code is not very idiomatic, but still, I think that the behavior should be consistent between Rust versions.
The text was updated successfully, but these errors were encountered: