]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/hard-tabs.rs
Tidy up and pass tests
[rust.git] / tests / target / hard-tabs.rs
index ecaffc165e6d2973fb6bfc5bc9584132f072166b..90be4d6b367afc8c8141347574b989fe0f108faa 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-normalize_comments: true
-// rustfmt-single_line_if_else_max_width: 0
 // rustfmt-wrap_comments: true
 // rustfmt-hard_tabs: true
 // rustfmt-error_on_line_overflow: false
@@ -32,8 +31,8 @@ fn foo(a: i32, a: i32, a: i32, a: i32, a: i32, a: i32, a: i32, a: i32, a: i32, a
        } else if different_cond() {
                something_else();
        } else {
-               aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
-                       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+               aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+                       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        }
 
        unsafe /* very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
@@ -73,11 +72,7 @@ fn generic<T>(arg: T) -> &SomeType
                arg(a, b, c, d, e)
        }
 
-       loong_func().quux(move || if true {
-               1
-       } else {
-               2
-       });
+       loong_func().quux(move || if true { 1 } else { 2 });
 
        fffffffffffffffffffffffffffffffffff(a, {
                SCRIPT_TASK_ROOT.with(|root| {
@@ -91,3 +86,14 @@ fn generic<T>(arg: T) -> &SomeType
                false => (),
        });
 }
+
+// #2296
+impl Foo {
+       // a comment
+       // on multiple lines
+       fn foo() {
+               // another comment
+               // on multiple lines
+               let x = true;
+       }
+}