summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue-5030.rs
blob: 08ffaac7d1dc2a77f4cf202db2a02828328daa5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// rustfmt-imports_granularity: Item
// rustfmt-group_imports: One

// Confirm that attributes are duplicated to all items in the use statement
#[cfg(feature = "foo")]
use std::collections::{
    HashMap,
    HashSet,
};

// Separate the imports below from the ones above
const A: usize = 0;

// Copying attrs works with import grouping as well
#[cfg(feature = "foo")]
use std::collections::{
    HashMap,
    HashSet,
};

#[cfg(feature = "spam")]
use qux::{bar, baz};