-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add support for let chains #11320
Comments
I would like to work on that. How should I synchronize the changes to ungrammer and rust-analyzer? |
Parsing turns out to be quite complex. The problem is that the The problem is especially tricky since we cannot know if rustc chose to implement this as an expression kind and later verify that We don't have a validation pass to the AST. But it may be necessary to introduce it. What do you think? Do you have an other way? |
Macros strike once more, way to go making the language a bit more inconsistent yet again 🙄 We did have a validation pass but disabled it for the time being(I don't recall the reason). If we don't reject the let expression for now where its disallowed that is fine. |
Is it possible to implement let without parentheses first? It’s the main usecase, and the macro is corner case. |
@TennyZhuang This is quite useless since if you want to implement it using the exisiting infra you will need to rewrite it anyway and if you want to create |
I've finished the work (I think), but I cannot send a PR until rust-analyzer/ungrammar#45 is merged and published since Cargo can't update Cargo.lock until then. |
Thank you @ChayimFriedman2 |
After I implemented all of this, now the Rust developers want to forbid parentheses in At least we can issue a better error... Though I am not sure parsing it is required to do that. |
See rust-lang/rust#88642.
The text was updated successfully, but these errors were encountered: