Don't merge crates when imports_granularity="Module"#6192
Don't merge crates when imports_granularity="Module"#6192mnkhouri wants to merge 2 commits intorust-lang:mainfrom
imports_granularity="Module"#6192Conversation
When merging imports using `imports_granularity="Module"`, individual
crate imports should get their own `use` statement on a new line.
```
// Before this commit:
use {library1, library2 as lib2, library3};
// After this commit:
use library1;
use library2 as lib2;
use library3;
```
Fixes: rust-lang#6191
|
I haven't really reviewed this, but I quickly tested out this branch on this input: use library1;
use library1::one;
use library1::two;
use library2 as lib2;
use library3;which produced this output: use library1;
use library1::{one, two};
use library2 as lib2;
use library3;It seems reasonable to me, but I'm wondering if it would be expected to produce the following instead: use library1::{self, one, two};
use library2 as lib2;
use library3; |
|
Thanks for trying it out!
I personally would also prefer the second output rather than the first, but I think this is out of scope for this PR because I think aliasing |
|
Hi, hoping we could bump this. |
|
Looks like this change was (nearly exactly) reimplemented in #6784, which renders this obsolete. |
When merging imports using
imports_granularity="Module", individual crate imports should get their ownusestatement on a new line.Fixes: #6191