diff options
| -rw-r--r-- | tests/source/5131_crate.rs | 14 | ||||
| -rw-r--r-- | tests/source/5131_module.rs (renamed from tests/source/5131.rs) | 0 | ||||
| -rw-r--r-- | tests/source/5131_one.rs | 15 | ||||
| -rw-r--r-- | tests/target/5131_crate.rs | 9 | ||||
| -rw-r--r-- | tests/target/5131_module.rs (renamed from tests/target/5131.rs) | 0 | ||||
| -rw-r--r-- | tests/target/5131_one.rs | 12 |
6 files changed, 50 insertions, 0 deletions
diff --git a/tests/source/5131_crate.rs b/tests/source/5131_crate.rs new file mode 100644 index 00000000000..96a31659022 --- /dev/null +++ b/tests/source/5131_crate.rs @@ -0,0 +1,14 @@ +// rustfmt-imports_granularity: Crate + +use foo::a; +use foo::a; +use foo::b; +use foo::b as b2; +use foo::b::f; +use foo::b::g; +use foo::b::g as g2; +use foo::c; +use foo::d::e; +use qux::h; +use qux::h as h2; +use qux::i; diff --git a/tests/source/5131.rs b/tests/source/5131_module.rs index 3e9139177c5..3e9139177c5 100644 --- a/tests/source/5131.rs +++ b/tests/source/5131_module.rs diff --git a/tests/source/5131_one.rs b/tests/source/5131_one.rs new file mode 100644 index 00000000000..61ddf13410d --- /dev/null +++ b/tests/source/5131_one.rs @@ -0,0 +1,15 @@ +// rustfmt-imports_granularity: One + +pub use foo::x; +pub use foo::x as x2; +pub use foo::y; +use bar::a; +use bar::b; +use bar::b::f; +use bar::b::f as f2; +use bar::b::g; +use bar::c; +use bar::d::e; +use bar::d::e as e2; +use qux::h; +use qux::i; diff --git a/tests/target/5131_crate.rs b/tests/target/5131_crate.rs new file mode 100644 index 00000000000..557d6670355 --- /dev/null +++ b/tests/target/5131_crate.rs @@ -0,0 +1,9 @@ +// rustfmt-imports_granularity: Crate + +use foo::{ + a, b, b as b2, + b::{f, g, g as g2}, + c, + d::e, +}; +use qux::{h, h as h2, i}; diff --git a/tests/target/5131.rs b/tests/target/5131_module.rs index 763024d6fa4..763024d6fa4 100644 --- a/tests/target/5131.rs +++ b/tests/target/5131_module.rs diff --git a/tests/target/5131_one.rs b/tests/target/5131_one.rs new file mode 100644 index 00000000000..a086dae5a42 --- /dev/null +++ b/tests/target/5131_one.rs @@ -0,0 +1,12 @@ +// rustfmt-imports_granularity: One + +pub use foo::{x, x as x2, y}; +use { + bar::{ + a, + b::{self, f, g}, + c, + d::{e, e as e2}, + }, + qux::{h, i}, +}; |
