]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/imports-reorder-lines.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[rust.git] / src / tools / rustfmt / tests / target / imports-reorder-lines.rs
1 use std::cmp::{a, b, c, d};
2 use std::cmp::{b, e, f, g};
3 use std::ddd::aaa;
4 use std::str;
5 // This comment should stay with `use std::ddd;`
6 use std::ddd;
7 use std::ddd::bbb;
8
9 mod test {}
10
11 use aaa;
12 use aaa::bbb;
13 use aaa::*;
14
15 mod test {}
16 // If item names are equal, order by rename
17
18 use test::{a as bb, b};
19 use test::{a as aa, c};
20
21 mod test {}
22 // If item names are equal, order by rename - no rename comes before a rename
23
24 use test::{a as bb, b};
25 use test::{a, c};
26
27 mod test {}
28 // `self` always comes first
29
30 use test::{self as bb, b};
31 use test::{a as aa, c};