-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Support imports of the form use {foo,bar}
#10808
Conversation
This should be discussed before merging. Personally, I'm not sure I'm entirely in favor of this. |
Any particular reason why not? I was surprised that it wasn't already supported. If I define a bunch of things at the top level of my library, and I need to use them from sub-modules, I see no reason why I should have to use a separate |
Iirc, we already support the more general |
I'm in favor but needs discussion. |
I have added this to the meeting agenda. As always, this could be decided before that though! |
If we support |
Consensus at the meeting was to get rid of |
I didn't even know |
The check-fast driver concatenates all the non |
Hrm, |
Pushed a fix for the pretty-printer. |
These unit tests generate non-compilable code. I did NOT `bless` them on purpose because the stderr output is not good. I'm surprised we don't auto-compile the suggestions here - is this something that can be easily enabled? See rust-lang#10808
Fix missing block for unsafe code If a block is declared as unsafe, it needs an extra layer of curly braces around it. Fixes rust-lang#10808 This code adds handling for `UnsafeSource::UserProvided` block, i.e. `unsafe { ... }`. Note that we do not handle the `UnsafeSource::CompilerGenerated` as it seems to not be possible to generate that with the user code (?), or at least doesn't seem to be needed to be handled explicitly. There is an issue with this code: it does not add an extra indentation for the unsafe blocks. I think this is a relatively minor concern for such an edge case, and should probably be done by a separate PR (fixing compile bug is more important than getting styling perfect especially when `rustfmt` will fix it anyway) ```rust // original code unsafe { ... } // code that is now generated by this PR { unsafe { ... } } // what we would ideally like to get { unsafe { ... } } ``` changelog: [`single_match`](https://rust-lang.github.io/rust-clippy/master/#single_match): Fix suggestion for `unsafe` blocks
This fixes #10806.