forked from rust-lang/rustfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve comments when flattening use statements
Issue rust-lang#4991
- Loading branch information
1 parent
a37d3ab
commit 356c85b
Showing
4 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
// rustfmt-imports_granularity: Item | ||
|
||
use a::{b, c, d}; | ||
use a::{ | ||
b, | ||
c, | ||
// Comment before a::d | ||
d, | ||
e, // Comment after a::e | ||
}; | ||
use a::{f::g, h::{i, j}}; | ||
use a::{l::{self, m, n::o, p::*}}; | ||
use a::q::{self}; | ||
// Comment before a::r | ||
use a::r; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters