fixup tests
This commit is contained in:
parent
50c95a074a
commit
fa75ef4663
@ -23,11 +23,11 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::str::Chars;
|
||||
|
||||
use rustfmt::*;
|
||||
use rustfmt::config::{Color, Config, ReportTactic};
|
||||
use rustfmt::config::summary::Summary;
|
||||
use rustfmt::config::{Color, Config, ReportTactic};
|
||||
use rustfmt::filemap::write_system_newlines;
|
||||
use rustfmt::rustfmt_diff::*;
|
||||
use rustfmt::*;
|
||||
|
||||
const DIFF_CONTEXT_SIZE: usize = 3;
|
||||
const CONFIGURATIONS_FILE_NAME: &str = "Configurations.md";
|
||||
|
@ -21,6 +21,7 @@
|
||||
Foo, Bar /* comment */};
|
||||
use Foo::{Bar, Baz};
|
||||
pub use syntax::ast::{Expr_, Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath};
|
||||
|
||||
use syntax::some::{};
|
||||
|
||||
use self;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use aaaaaaaaaaaaaaa::bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
|
||||
use aaaaaaaaaaaaaaa::{bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccccccc, dddddddd};
|
||||
use aaaaaaaaaaaaaaa::{bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, ccccccccccccccccccccccccccccccc,
|
||||
ddddddddd};
|
||||
use aaaaaaaaaaaaaaa::bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
|
||||
|
@ -2,9 +2,9 @@
|
||||
// rustfmt-reorder_imported_names: true
|
||||
|
||||
use std::cmp::{a, b, c, d};
|
||||
use std::ddd::{a, b, c as g, d as p};
|
||||
use std::ddd::aaa;
|
||||
// This comment should stay with `use std::ddd:bbb;`
|
||||
use std::ddd::bbb;
|
||||
use std::ddd::{a, b, c as g, d as p};
|
||||
/// This comment should stay with `use std::str;`
|
||||
use std::str;
|
||||
// This comment should stay with `use std::ddd:bbb;`
|
||||
use std::ddd::bbb;
|
||||
|
@ -2,29 +2,29 @@
|
||||
|
||||
use std::cmp::{a, b, c, d};
|
||||
use std::cmp::{b, e, f, g};
|
||||
use std::ddd::aaa;
|
||||
use std::str;
|
||||
// This comment should stay with `use std::ddd;`
|
||||
use std::ddd;
|
||||
use std::ddd::aaa;
|
||||
use std::ddd::bbb;
|
||||
use std::str;
|
||||
|
||||
mod test {}
|
||||
|
||||
use aaa;
|
||||
use aaa::*;
|
||||
use aaa::bbb;
|
||||
use aaa::*;
|
||||
|
||||
mod test {}
|
||||
// If item names are equal, order by rename
|
||||
|
||||
use test::{a as aa, c};
|
||||
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, c};
|
||||
use test::{a as bb, b};
|
||||
use test::{a, c};
|
||||
|
||||
mod test {}
|
||||
// `self` always comes first
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
use test::{/* A */ self /* B */, Other /* C */};
|
||||
|
||||
use {Bar /* comment */, /* Pre-comment! */ Foo};
|
||||
use Foo::{Bar, Baz};
|
||||
use syntax;
|
||||
pub use syntax::ast::{Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath, Expr_};
|
||||
use {Bar /* comment */, /* Pre-comment! */ Foo};
|
||||
|
||||
use self;
|
||||
use std::io;
|
||||
@ -54,8 +54,8 @@ fn test() {
|
||||
use foo::{baz, qux as bar};
|
||||
|
||||
// With absolute paths
|
||||
use foo;
|
||||
use Foo;
|
||||
use foo;
|
||||
use foo::Bar;
|
||||
use foo::{Bar, Baz};
|
||||
use {Bar, Baz};
|
||||
|
@ -14,7 +14,9 @@ mod a {
|
||||
use d;
|
||||
}
|
||||
|
||||
use z;
|
||||
|
||||
use y;
|
||||
|
||||
use a;
|
||||
use x;
|
||||
use y;
|
||||
use z;
|
||||
|
@ -2,6 +2,7 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
/* comment */
|
||||
|
||||
/* comment */
|
||||
|
||||
/* comment */
|
||||
|
Loading…
Reference in New Issue
Block a user