]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/lint/lint-unnecessary-parens.rs
let_chains: Adjust unnecessary parens tests.
[rust.git] / src / test / ui / lint / lint-unnecessary-parens.rs
index dc74d69bd8d54460a8ec44c5ed487c107867dc29..d684616565f8ea44843f685883444d5583562367 100644 (file)
@@ -22,8 +22,8 @@ fn main() {
     match (true) { //~ ERROR unnecessary parentheses around `match` head expression
         _ => {}
     }
-    if let 1 = (1) {} //~ ERROR unnecessary parentheses around `if let` head expression
-    while let 1 = (2) {} //~ ERROR unnecessary parentheses around `while let` head expression
+    if let 1 = (1) {} //~ ERROR unnecessary parentheses around `let` scrutinee
+    while let 1 = (2) {} //~ ERROR unnecessary parentheses around `let` scrutinee
     let v = X { y: false };
     // struct lits needs parens, so these shouldn't warn.
     if (v == X { y: true }) {}