]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/chains-visual.rs
more fallout
[rust.git] / tests / target / chains-visual.rs
index 472532676c5478b0c4cfb20459ae0285f961cae6..e88c08fb93269ec4ac86e23d382e71215882d14a 100644 (file)
@@ -1,6 +1,6 @@
+// rustfmt-normalize_comments: true
 // rustfmt-single_line_if_else_max_width: 0
 // rustfmt-chain_indent: Visual
-// rustfmt-chain_base_indent: Visual
 // Test chain formatting.
 
 fn main() {
@@ -20,15 +20,15 @@ fn main() {
     // Test case where first chain element isn't a path, but is shorter than
     // the size of a tab.
     x().y(|| match cond() {
-        true => (),
-        false => (),
-    });
+              true => (),
+              false => (),
+          });
 
     loong_func().quux(move || if true {
-        1
-    } else {
-        2
-    });
+                          1
+                      } else {
+                          2
+                      });
 
     some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
         let x = c;
@@ -49,15 +49,15 @@ fn main() {
         SCRIPT_TASK_ROOT.with(|root| { *root.borrow_mut() = Some(&script_task); });
     });
 
-    let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx.map(|x| x + 5)
-                                                                          .map(|x| x / 2)
-                                                                          .fold(0,
-                                                                                |acc, x| acc + x);
+    let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum =
+        xxxxxxx.map(|x| x + 5)
+               .map(|x| x / 2)
+               .fold(0, |acc, x| acc + x);
 
     aaaaaaaaaaaaaaaa.map(|x| {
-                        x += 1;
-                        x
-                    })
+                             x += 1;
+                             x
+                         })
                     .filter(some_mod::some_filter)
 }
 
@@ -104,8 +104,9 @@ fn floaters() {
 
     Foo { x: val }
         .baz(|| {
-            // force multiline
-        })
+                 force();
+                 multiline();
+             })
         .quux();
 
     Foo {
@@ -113,8 +114,9 @@ fn floaters() {
         z: ok,
     }
     .baz(|| {
-        // force multiline
-    })
+             force();
+             multiline();
+         })
     .quux();
 
     a +