]> 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 07a962142853e4801307c28535f17ad061f43091..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
@@ -73,13 +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| {
@@ -93,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;
+       }
+}