-
Notifications
You must be signed in to change notification settings - Fork 13.3k
advanced_slice_patterns has unreachable expression #37598
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
Comments
Minimal example #![feature(slice_patterns)]
fn check(list: &[u8]) {
match list {
&[] => {},
&[u1, u2, ref next..] => {},
&[u1] => {},
}
} Fails with
|
regression introduced in #36695. |
@arielb1: How can this be a stable-nightly regression when this affects a gated feature? |
Not sure what's the policy about it. It's a regression. |
Yeah, I totally agree that this is a regression, although the label is inaccurate. I have wanted a |
The logic used to be wildly wrong, but before the HAIR patch its wrongness was hidden by another bug. Fixes rust-lang#37598.
_match: correct max_slice_length logic The logic used to be wildly wrong, but before the HAIR patch its wrongness was in most cases hidden by another bug. Fixes #37598. r? @nikomatsakis
Hello,
According to this chapiter, I have writted this example:
But after the rustc 1.14.0-nightly version from 2016-10-25 -aef18be1b-,
I expected to see this happen:
The text was updated successfully, but these errors were encountered: