summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/imports/imports-reorder-lines.rs
blob: 2b018544eaeb259150cb7086a0220fadf30a10aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use std::str;
use std::cmp::{d, c, b, a};
use std::cmp::{b, e, g, f};
use std::ddd::aaa;
// This comment should stay with `use std::ddd;`
use std::ddd;
use std::ddd::bbb;

mod test {
}

use aaa::bbb;
use aaa;
use aaa::*;

mod test {}
// If item names are equal, order by rename

use test::{a as bb, b};
use test::{a as aa, c};

mod test {}
// If item names are equal, order by rename - no rename comes before a rename

use test::{a as bb, b};
use test::{a, c};

mod test {}
// `self` always comes first

use test::{a as aa, c};
use test::{self as bb, b};