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
"or-patterns should have already been handled" when using feature(or_patterns) #72680
Comments
|
It looks like the problem is here in rust/src/librustc_mir_build/build/matches/test.rs Lines 684 to 695 in 5d39f1f
|
|
Reproducible with recent nightlies too: Triggered by more than 3 pattern condition with this compiler version. |
|
I would have assumed that the implementation merely desugars into a bunch of top-level or-patterns. Is that not the case? Why are tuples special cased? If it isn't too involved, I could take a crack at this with some guidance... very much want to see this over the finish line. |
…asper Explicitly checking for or-pattern before test Fixes rust-lang#72680 cc rust-lang#54883 r? `@varkor`
…asper Explicitly checking for or-pattern before test Fixes rust-lang#72680 cc rust-lang#54883 r? ``@varkor``
…asper Explicitly checking for or-pattern before test Fixes rust-lang#72680 cc rust-lang#54883 r? ```@varkor```
…asper Explicitly checking for or-pattern before test Fixes rust-lang#72680 cc rust-lang#54883 r? ````@varkor````


Zenithsiz commentedMay 28, 2020
•
edited
When using the
or_patternsfeature, attempting to match on a tuple creates a compiler panic.The following code causes the panic.
(Also available at the playground)
This occurs both on the playground and on my local machine on a previous version (details below).
Meta
Rust version from the playground:
Local version:
Playground backtrace:
Local backtrace:
EDIT: Added local machine backtrace too
The text was updated successfully, but these errors were encountered: