]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/single_match.stderr
Rollup merge of #84221 - ABouttefeux:generic-arg-elision, r=estebank
[rust.git] / src / tools / clippy / tests / ui / single_match.stderr
index 7ea6955b7401e4ecb17ca4995b820a10bf4bb5c3..9ef2a8668a6faffdcb9e92757bc742b597e0db1a 100644 (file)
@@ -119,5 +119,14 @@ LL | |         _ => (),
 LL | |     }
    | |_____^ help: try this: `if let Bar::A = x { println!() }`
 
-error: aborting due to 12 previous errors
+error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
+  --> $DIR/single_match.rs:142:5
+   |
+LL | /     match x {
+LL | |         None => println!(),
+LL | |         _ => (),
+LL | |     };
+   | |_____^ help: try this: `if let None = x { println!() }`
+
+error: aborting due to 13 previous errors