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