summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr')
-rw-r--r--src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr b/src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr
new file mode 100644
index 000000000..d63f20903
--- /dev/null
+++ b/src/tools/clippy/tests/ui/wildcard_enum_match_arm.stderr
@@ -0,0 +1,44 @@
+error: wildcard match will also match any future added variants
+ --> $DIR/wildcard_enum_match_arm.rs:42:9
+ |
+LL | _ => eprintln!("Not red"),
+ | ^ help: try this: `Color::Green | Color::Blue | Color::Rgb(..) | Color::Cyan`
+ |
+note: the lint level is defined here
+ --> $DIR/wildcard_enum_match_arm.rs:4:9
+ |
+LL | #![deny(clippy::wildcard_enum_match_arm)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: wildcard match will also match any future added variants
+ --> $DIR/wildcard_enum_match_arm.rs:46:9
+ |
+LL | _not_red => eprintln!("Not red"),
+ | ^^^^^^^^ help: try this: `_not_red @ Color::Green | _not_red @ Color::Blue | _not_red @ Color::Rgb(..) | _not_red @ Color::Cyan`
+
+error: wildcard match will also match any future added variants
+ --> $DIR/wildcard_enum_match_arm.rs:50:9
+ |
+LL | not_red => format!("{:?}", not_red),
+ | ^^^^^^^ help: try this: `not_red @ Color::Green | not_red @ Color::Blue | not_red @ Color::Rgb(..) | not_red @ Color::Cyan`
+
+error: wildcard match will also match any future added variants
+ --> $DIR/wildcard_enum_match_arm.rs:66:9
+ |
+LL | _ => "No red",
+ | ^ help: try this: `Color::Red | Color::Green | Color::Blue | Color::Rgb(..) | Color::Cyan`
+
+error: wildcard matches known variants and will also match future added variants
+ --> $DIR/wildcard_enum_match_arm.rs:83:9
+ |
+LL | _ => {},
+ | ^ help: try this: `ErrorKind::PermissionDenied | _`
+
+error: wildcard matches known variants and will also match future added variants
+ --> $DIR/wildcard_enum_match_arm.rs:101:13
+ |
+LL | _ => (),
+ | ^ help: try this: `Enum::B | _`
+
+error: aborting due to 6 previous errors
+