]> git.lizzy.rs Git - rust.git/commitdiff
Update tests
authorSeiichi Uchida <seuchida@gmail.com>
Sat, 31 Mar 2018 04:16:36 +0000 (13:16 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Sat, 31 Mar 2018 04:16:36 +0000 (13:16 +0900)
1. snake_case < CamelCase < UPPER_SNAKE_CASE
2. Use vertical layout for list with nested imports.

tests/source/issue-2256.rs
tests/target/imports.rs
tests/target/issue-2256.rs

index b505b96e2b317a9857acd5ce93fda94f6e763f9d..a206e8db6cf4d74c6b8ad85bebc5f7561146d2c4 100644 (file)
@@ -2,11 +2,11 @@
 use std::{};
 use std::borrow::Cow;
 
-/* comment */ use std::{};
-/* comment */ use std::{};
+/* comment */ use std::{};
+/* comment */ use std::{};
 
 
 
 
 
-/* comment */ use std::{};
+/* comment */ use std::{};
index c8f5921afb349defc2927dd33da7837c279acf40..236fee95e82befce8a8cd55cf50f18c86ccb96d9 100644 (file)
 
 use test::{/* A */ self /* B */, Other /* C */};
 
-use Foo::{Bar, Baz};
 use syntax;
 pub use syntax::ast::{Expr, ExprAssign, ExprCall, ExprMethodCall, ExprPath, Expr_};
+use Foo::{Bar, Baz};
 use {Bar /* comment */, /* Pre-comment! */ Foo};
 
-use self;
 use std::io;
 use std::io;
 
@@ -54,14 +53,14 @@ fn test() {
 use foo::{baz, qux as bar};
 
 // With absolute paths
-use Foo;
 use foo;
 use foo::Bar;
 use foo::{Bar, Baz};
+use Foo;
 use {Bar, Baz};
 
 // Root globs
-use ::*;
+use *;
 use *;
 
 // spaces used to cause glob imports to disappear (#1356)
@@ -73,14 +72,24 @@ fn test() {
 use self::unix::{};
 
 // nested imports
-use foo::{a, b, boo, c,
-          bar::{baz, qux, xxxxxxxxxxx, yyyyyyyyyyyyy, zzzzzzzzzzzzzzzz,
-                foo::{a, b, cxxxxxxxxxxxxx, yyyyyyyyyyyyyy, zzzzzzzzzzzzzzzz}}};
-
-use fooo::{bar, x, y, z,
-           baar::foobar::{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
+use foo::{a,
+          b,
+          bar::{baz,
+                foo::{a, b, cxxxxxxxxxxxxx, yyyyyyyyyyyyyy, zzzzzzzzzzzzzzzz},
+                qux,
+                xxxxxxxxxxx,
+                yyyyyyyyyyyyy,
+                zzzzzzzzzzzzzzzz},
+          boo,
+          c};
+
+use fooo::{baar::foobar::{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
                           zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz},
-           bar::*};
+           bar,
+           bar::*,
+           x,
+           y,
+           z};
 
 // nested imports with a single sub-tree.
 use a::b::c::d;
index d4e594515b3c239bd2784f8da5a5b501f4ee2db7..0a59c308394e30f944b379697be23c69fb17b149 100644 (file)
@@ -1,8 +1,7 @@
 // こんにちは
 use std::borrow::Cow;
 
-/* comment */
+/* comment 1 */
+/* comment 2 */
 
-/* comment */
-
-/* comment */
+/* comment 3 */