mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 04:14:28 +00:00
Add tests for merge_imports config option
This commit is contained in:
parent
518ece2272
commit
805987b4b1
26
tests/source/merge_imports.rs
Normal file
26
tests/source/merge_imports.rs
Normal file
@ -0,0 +1,26 @@
|
||||
// rustfmt-merge_imports: true
|
||||
// rustfmt-reorder_imports: true
|
||||
// rustfmt-reorder_imported_names: true
|
||||
|
||||
use a::{c,d,b};
|
||||
use a::{d, e, b, a, f};
|
||||
use a::{f, g, c};
|
||||
|
||||
#[doc(hidden)]
|
||||
use a::b;
|
||||
use a::c;
|
||||
use a::d;
|
||||
|
||||
use a::{c, d, e};
|
||||
#[doc(hidden)]
|
||||
use a::b;
|
||||
use a::d;
|
||||
|
||||
pub use foo::bar;
|
||||
use foo::{a, b, c};
|
||||
pub use foo::foobar;
|
||||
|
||||
use a::{b::{c::*}};
|
||||
use a::{b::{c::{}}};
|
||||
use a::{b::{c::d}};
|
||||
use a::{b::{c::{xxx, yyy, zzz}}};
|
18
tests/target/merge_imports.rs
Normal file
18
tests/target/merge_imports.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// rustfmt-merge_imports: true
|
||||
// rustfmt-reorder_imports: true
|
||||
// rustfmt-reorder_imported_names: true
|
||||
|
||||
use a::{a, b, c, d, e, f, g};
|
||||
|
||||
#[doc(hidden)]
|
||||
use a::b;
|
||||
use a::{c, d};
|
||||
|
||||
#[doc(hidden)]
|
||||
use a::b;
|
||||
use a::{c, d, e};
|
||||
|
||||
use foo::{a, b, c};
|
||||
pub use foo::{bar, foobar};
|
||||
|
||||
use a::b::c::{d, xxx, yyy, zzz, *};
|
Loading…
Reference in New Issue
Block a user