]> 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 4ac6df5def85dee9455643d9c575ddc345d0d269..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,14 +72,12 @@ 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| { *root.borrow_mut() = Some(&script_task); });
+               SCRIPT_TASK_ROOT.with(|root| {
+                       *root.borrow_mut() = Some(&script_task);
+               });
        });
        a.b.c.d();
 
@@ -89,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;
+       }
+}