]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/rfc-2294-if-let-guard/warns.stderr
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / rfc-2294-if-let-guard / warns.stderr
index 45720f9fbc5515ae9441b62e001f540be1af48c1..c7627f1c3c50c1c6c100d381cbb8a47c656a0926 100644 (file)
@@ -1,4 +1,4 @@
-error: irrefutable if-let guard
+error: irrefutable `if let` guard pattern
   --> $DIR/warns.rs:7:24
    |
 LL |         Some(x) if let () = x => {}
@@ -9,6 +9,8 @@ note: the lint level is defined here
    |
 LL | #[deny(irrefutable_let_patterns)]
    |        ^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: this pattern will always match, so the guard is useless
+   = help: consider removing the guard and adding a `let` inside the match arm
 
 error: unreachable pattern
   --> $DIR/warns.rs:16:25