-
Notifications
You must be signed in to change notification settings - Fork 898
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
Rfc: use block indent for multi-lined imports #1785
Conversation
Hmm, it turns out we didn't agree on a style for this (rust-lang/style-team#24), so I think we should not change the default for now. Could we put this behind an option for now? |
Looks like using multiple imports are not welcomed, so I will change this PR to support A, C and D. |
@nrc Do you think we could set |
Yes, I think that would be great (once the sorting matches the spec). |
We group items in snake_case, CamelCase and SCREAMING_SNAKE_CASE
Updated & rebased. |
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 great, thank you! I had a minor clarifying question for the options docs, otherwise looks ready to land
```rust | ||
use foo::{xxx, yyy, zzz}; | ||
|
||
use foo::{aaa, bbb, ccc, ddd, eee, fff}; |
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.
What happens when this gets too long to fit on one line?
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.
When Horizontal
layout is spcecified, rustfmt forces horitonzal layout and puts every thing on one line even if it exceeds max width.
Added note to Configurations.md about using |
Closes #1784.