-
Notifications
You must be signed in to change notification settings - Fork 22
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
match
s simplification phases
#806
Comments
A first solution that we designed to deal with these issues would be to add
would rewrite as
|
Sub-issue for if let guards: #814 |
To simplify we will allow guards only on whole patterns and not sub patterns. Deep disjunction elimination will need to take place before the phase introducing guards. |
For the phase taking care of opaque types and array patterns, we should implement a visitor working bottom-up and rewriting these patterns with Note on array/slice patterns in Rust:
We don't want to try making a fully parameterized phase as it would be hard too complicated with how phases are done. But we should parameterize it by some flags allowing to activate or not the features it implements (arrays, usizes, isizes, etc.). |
@maximebuyse are you actually working on this right now or shall it have a different status? |
|
I currently have an almost finished version for opaque types and array patterns. Three things are still missing:
|
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days. |
Rust patterns are very expressive.
The different languages we target have variable expressiveness in patterns, and often are less expressive than Rust ones.
Issues related to the lack of expressivity of matches:
usize
s,isize
s (+u128
/i128
/f32
/f64
) #464x @ subpattern
) #833The text was updated successfully, but these errors were encountered: