File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1
1
// rustfmt-imports_granularity: Item
2
+ // rustfmt-group_imports: One
2
3
4
+ // Confirm that attributes are duplicated to all items in the use statement
3
5
#[ cfg( feature = "foo" ) ]
4
6
use std:: collections:: {
5
7
HashMap ,
6
8
HashSet ,
7
9
} ;
10
+
11
+ // Separate the imports below from the ones above
12
+ const A : usize = 0 ;
13
+
14
+ // Copying attrs works with import grouping as well
15
+ #[ cfg( feature = "foo" ) ]
16
+ use std:: collections:: {
17
+ HashMap ,
18
+ HashSet ,
19
+ } ;
20
+
21
+ #[ cfg( feature = "spam" ) ]
22
+ use qux:: { bar, baz} ;
Original file line number Diff line number Diff line change 1
1
// rustfmt-imports_granularity: Item
2
+ // rustfmt-group_imports: One
2
3
4
+ // Confirm that attributes are duplicated to all items in the use statement
5
+ #[ cfg( feature = "foo" ) ]
6
+ use std:: collections:: HashMap ;
7
+ #[ cfg( feature = "foo" ) ]
8
+ use std:: collections:: HashSet ;
9
+
10
+ // Separate the imports below from the ones above
11
+ const A : usize = 0 ;
12
+
13
+ // Copying attrs works with import grouping as well
14
+ #[ cfg( feature = "spam" ) ]
15
+ use qux:: bar;
16
+ #[ cfg( feature = "spam" ) ]
17
+ use qux:: baz;
3
18
#[ cfg( feature = "foo" ) ]
4
19
use std:: collections:: HashMap ;
5
20
#[ cfg( feature = "foo" ) ]
You can’t perform that action at this time.
0 commit comments