summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/match_single_binding.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/tools/clippy/tests/ui/match_single_binding.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/match_single_binding.stderr')
-rw-r--r--src/tools/clippy/tests/ui/match_single_binding.stderr27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/tools/clippy/tests/ui/match_single_binding.stderr b/src/tools/clippy/tests/ui/match_single_binding.stderr
index 2b9ec7ee7..e960d64ad 100644
--- a/src/tools/clippy/tests/ui/match_single_binding.stderr
+++ b/src/tools/clippy/tests/ui/match_single_binding.stderr
@@ -213,5 +213,30 @@ LL + println!("Needs curlies");
LL ~ };
|
-error: aborting due to 14 previous errors
+error: this match could be written as a `let` statement
+ --> $DIR/match_single_binding.rs:154:5
+ |
+LL | / match r {
+LL | | x => match x {
+LL | | Some(_) => {
+LL | | println!("Some");
+... |
+LL | | },
+LL | | };
+ | |_____^
+ |
+help: consider using a `let` statement
+ |
+LL ~ let x = r;
+LL + match x {
+LL + Some(_) => {
+LL + println!("Some");
+LL + },
+LL + None => {
+LL + println!("None");
+LL + },
+LL ~ };
+ |
+
+error: aborting due to 15 previous errors