rust-clippy/tests/ui/wildcard_enum_match_arm.stderr

45 lines
1.7 KiB
Text
Raw Normal View History

error: wildcard match will also match any future added variants
--> $DIR/wildcard_enum_match_arm.rs:40:9
|
2019-02-18 22:55:16 +00:00
LL | _ => eprintln!("Not red"),
2023-07-01 11:08:01 +00:00
| ^ help: try: `Color::Green | Color::Blue | Color::Rgb(..) | Color::Cyan`
|
2020-01-31 19:21:10 +00:00
note: the lint level is defined here
--> $DIR/wildcard_enum_match_arm.rs:3:9
2019-02-18 22:55:16 +00:00
|
LL | #![deny(clippy::wildcard_enum_match_arm)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: wildcard match will also match any future added variants
--> $DIR/wildcard_enum_match_arm.rs:44:9
|
2019-02-18 22:55:16 +00:00
LL | _not_red => eprintln!("Not red"),
2023-07-01 11:08:01 +00:00
| ^^^^^^^^ help: try: `_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:48:9
|
2019-02-18 22:55:16 +00:00
LL | not_red => format!("{:?}", not_red),
2023-07-01 11:08:01 +00:00
| ^^^^^^^ help: try: `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:64:9
|
2019-02-18 22:55:16 +00:00
LL | _ => "No red",
2023-07-01 11:08:01 +00:00
| ^ help: try: `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:81:9
|
LL | _ => {},
2023-07-01 11:08:01 +00:00
| ^ help: try: `ErrorKind::PermissionDenied | _`
error: wildcard match will also match any future added variants
--> $DIR/wildcard_enum_match_arm.rs:99:13
|
LL | _ => (),
2023-07-01 11:08:01 +00:00
| ^ help: try: `Enum::B | Enum::__Private`
error: aborting due to 6 previous errors