-
Notifications
You must be signed in to change notification settings - Fork 204
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
feat: multiple item imports in use statement #1466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution looks pretty good and is quite simple because of the desugaring. I do think we should parse UseTrees recursively which should clean up the parsing code a little and allow us to support recursive {
and }
in imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks very good. I did run into some minor usability concerns while testing it though. Once we fix these last issues I think it is all set!
Closing this PR, it is superseded by #1548 |
Reviewing this PR I got into a bit of a rabbit hole with handling the cases for |
Looks like clippy caught some code which can be simplified |
Head branch was pushed to by a user without write access
Description
Implement multiple item imports in use statement:
use foo::{bar, hello}
.Summary
Added support for multiple item imports in the use statement, allowing for more flexible and targeted module imports. Updated the parser, AST, and desugaring logic to handle the new syntax.
Additional Context
PR Checklist
cargo fmt
on default settings.