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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support destructuring assignment #11532
Comments
Veykril
added
A-parser
parser issues
Broken Window
Bugs / technical debt to be addressed immediately
labels
Feb 22, 2022
Taking this. Oops, posted too many comments. |
This was referenced Feb 24, 2022
bors bot
added a commit
that referenced
this issue
Mar 5, 2022
11598: feat: Parse destructuring assignment r=Veykril a=ChayimFriedman2 Part of #11532. Lowering is not as easy and may not even be feasible right now as it requires generating identifiers: `(a, b) = (b, a)` is desugared into ```rust { let (<gensym_a>, <gensym_b>) = (b, a); a = <gensym_a>; b = <gensym_b>; } ``` rustc uses hygiene to implement that, but we don't support hygiene yet. However, I think parsing was the main problem as lowering will just affect type inference, and while `{unknown}` is not nice it's much better than a syntax error. I'm still looking for the best way to do lowering, though. Fixes #11454. Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
Veykril
removed
the
Broken Window
Bugs / technical debt to be addressed immediately
label
Mar 16, 2022
Parsing was implemented in #11598, we don't lower this properly yet though. |
flodiebold
added
A-ty
type system / type inference / traits / method resolution
C-feature
Category: feature request
labels
Apr 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turns out this is getting stabilized in 1.59 (which releases in 2 days 馃槺) and we can't parse this properly yet. RFC text is here https://github.com/rust-lang/rfcs/blob/master/text/2909-destructuring-assignment.md
This will need some syntax/grammar adjustments.
cc #11454
The text was updated successfully, but these errors were encountered: