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. |
nrc
left a comment
There was a problem hiding this comment.
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.
What happens when this gets too long to fit on one line?
There was a problem hiding this comment.
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.