about summary refs log tree commit diff
path: root/src/test/ui/while-let.stderr
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-12-05 13:12:39 -0800
committerCamelid <camelidcamel@gmail.com>2021-02-18 16:21:16 -0800
commit5d2a2a1caa1a12a5c445fcc99e2dee42e5a5f3d7 (patch)
tree29e1de6b2a08f595a3bbc550e0c0915caed7524e /src/test/ui/while-let.stderr
parent0148b971c921a0831fbf3357e5936eec724e3566 (diff)
downloadrust-5d2a2a1caa1a12a5c445fcc99e2dee42e5a5f3d7.tar.gz
rust-5d2a2a1caa1a12a5c445fcc99e2dee42e5a5f3d7.zip
Add explanations and suggestions to `irrefutable_let_patterns` lint
Diffstat (limited to 'src/test/ui/while-let.stderr')
-rw-r--r--src/test/ui/while-let.stderr7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/while-let.stderr b/src/test/ui/while-let.stderr
index 6538b9fbe6f..04e77bf9470 100644
--- a/src/test/ui/while-let.stderr
+++ b/src/test/ui/while-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 loop will never exit
+   = help: consider instead using a `loop { ... }` with a `let` inside it
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 warning: irrefutable `while let` pattern
@@ -23,6 +25,8 @@ LL | |         println!("irrefutable pattern");
 LL | |     });
    | |_______- in this macro invocation
    |
+   = note: this pattern will always match, so the loop will never exit
+   = help: consider instead using a `loop { ... }` with a `let` inside it
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 warning: irrefutable `while let` pattern
@@ -33,6 +37,9 @@ LL | |         println!("irrefutable pattern");
 LL | |         break;
 LL | |     }
    | |_____^
+   |
+   = note: this pattern will always match, so the loop will never exit
+   = help: consider instead using a `loop { ... }` with a `let` inside it
 
 warning: 3 warnings emitted