about summary refs log tree commit diff
path: root/src/test/ui/expr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/expr')
-rw-r--r--src/test/ui/expr/if/if-let.stderr16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/expr/if/if-let.stderr b/src/test/ui/expr/if/if-let.stderr
index 468e913a773..c64c9093ee5 100644
--- a/src/test/ui/expr/if/if-let.stderr
+++ b/src/test/ui/expr/if/if-let.stderr
@@ -10,6 +10,8 @@ LL | |     });
    | |_______- in this macro invocation
    |
    = note: `#[warn(irrefutable_let_patterns)]` on by default
+   = note: this pattern will always match, so the `if let` is useless
+   = help: consider replacing the `if let` with a `let`
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 warning: irrefutable `if let` pattern
@@ -23,6 +25,8 @@ LL | |         println!("irrefutable pattern");
 LL | |     });
    | |_______- in this macro invocation
    |
+   = note: this pattern will always match, so the `if let` is useless
+   = help: consider replacing the `if let` with a `let`
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 warning: irrefutable `if let` pattern
@@ -32,6 +36,9 @@ LL | /     if let a = 1 {
 LL | |         println!("irrefutable pattern");
 LL | |     }
    | |_____^
+   |
+   = note: this pattern will always match, so the `if let` is useless
+   = help: consider replacing the `if let` with a `let`
 
 warning: irrefutable `if let` pattern
   --> $DIR/if-let.rs:30:5
@@ -44,6 +51,9 @@ LL | |     } else {
 LL | |         println!("else in irrefutable `if let`");
 LL | |     }
    | |_____^
+   |
+   = note: this pattern will always match, so the `if let` is useless
+   = help: consider replacing the `if let` with a `let`
 
 warning: irrefutable `if let` pattern
   --> $DIR/if-let.rs:40:12
@@ -53,6 +63,9 @@ LL |       } else if let a = 1 {
 LL | |         println!("irrefutable pattern");
 LL | |     }
    | |_____^
+   |
+   = note: this pattern will always match, so the `if let` is useless
+   = help: consider replacing the `if let` with a `let`
 
 warning: irrefutable `if let` pattern
   --> $DIR/if-let.rs:46:12
@@ -62,6 +75,9 @@ LL |       } else if let a = 1 {
 LL | |         println!("irrefutable pattern");
 LL | |     }
    | |_____^
+   |
+   = note: this pattern will always match, so the `if let` is useless
+   = help: consider replacing the `if let` with a `let`
 
 warning: 6 warnings emitted