rust/tests/target/imports-reorder-lines.rs

34 lines
588 B
Rust
Raw Normal View History

// rustfmt-reorder_imports: true
2017-07-13 11:43:35 +02:00
use std::cmp::{a, b, c, d};
use std::cmp::{b, e, f, g};
2018-03-15 02:06:54 +01:00
use std::ddd::aaa;
use std::str;
// This comment should stay with `use std::ddd;`
use std::ddd;
use std::ddd::bbb;
mod test {}
use aaa;
use aaa::bbb;
2018-03-15 02:06:54 +01:00
use aaa::*;
mod test {}
// If item names are equal, order by rename
use test::{a as bb, b};
2018-03-15 02:06:54 +01:00
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};
2018-03-15 02:06:54 +01:00
use test::{a, c};
mod test {}
// `self` always comes first
use test::{self as bb, b};
use test::{a as aa, c};