-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Regression on array pattern-matching #15104
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
cc @jakub-, I think one of your recent patches fixed this, right? |
@alexcrichton Yeah but this looks different... looking! |
My bisect ended up pointing f5e513b as the first bad commit. This should help narrowing down the problem, as it has a relatively small diff |
I just noticed this as well. A more minimal test case: fn main() {
match &[1,2,3] {
[] => (),
[_] => (),
[_, ..] => () // error: unreachable pattern
}
} Notably, the error vanishes if you remove the one-element pattern: fn main() {
match &[1,2,3] {
[] => (),
[_, ..] => () // works fine
}
} |
This is fixed now. |
Thanks @jakub-! |
Skip mutable diagnostics on synthetic bindings Fixes rust-lang/rust-analyzer#15099 We probabnly need to look into this in a more general manner in the future now that we desugar more things
Until friday (commit 3047614) the following (very contrived) code compiled:
With ca3e557, it fails with:
I'll try to bisect and get to a single commit
The text was updated successfully, but these errors were encountered: