]> git.lizzy.rs Git - rust.git/commitdiff
Rustfmt tests
authorZaki Manian <zaki@manian.org>
Sun, 3 Sep 2017 20:46:49 +0000 (13:46 -0700)
committerZaki Manian <zaki@manian.org>
Sun, 3 Sep 2017 20:46:49 +0000 (13:46 -0700)
tests/ui/is_unit_expr.rs

index 8a986494eaf76cca02f91a4c9db368d9a5677ff8..d1f45d517b05b44e8499731b493dd6a3bf1b7883 100644 (file)
@@ -4,42 +4,45 @@
 #[allow(unused_variables)]
 
 fn main() {
-
-    //lint should note removing the semicolon from "baz" 
+    // lint should note removing the semicolon from "baz"
     let x = {
         "foo";
         "baz";
     };
 
 
-    //lint should ignore false positive. 
-    let y = if true{
-        "foo" 
-    } else{
+    // lint should ignore false positive.
+    let y = if true {
+        "foo"
+    } else {
         return;
     };
 
-    //lint should note removing semicolon from "bar"
-    let z = if true{
+    // lint should note removing semicolon from "bar"
+    let z = if true {
         "foo";
-    } else{
+    } else {
         "bar";
     };
 
 
     let a1 = Some(5);
 
-    //lint should ignore false positive
+    // lint should ignore false positive
     let a2 = match a1 {
         Some(x) => x,
-        _ => {return;},
+        _ => {
+            return;
+        },
     };
 
-    //lint should note removing the semicolon after `x;` 
+    // lint should note removing the semicolon after `x;`
     let a3 = match a1 {
-        Some(x) => {x;},
-        _ => {0;},
+        Some(x) => {
+            x;
+        },
+        _ => {
+            0;
+        },
     };
-
-
 }