return;
}
- let mut message = "wildcard match will miss any future added variants.";
+ let mut message = "wildcard match will miss any future added variants";
if let ty::Adt(def, _) = ty.kind {
if def.is_variant_list_non_exhaustive() {
- message = "match on non-exhaustive enum doesn't explicitly match all known variants.";
+ message = "match on non-exhaustive enum doesn't explicitly match all known variants";
suggestion.push(String::from("_"));
}
}
-error: wildcard match will miss any future added variants.
+error: wildcard match will miss any future added variants
--> $DIR/wildcard_enum_match_arm.rs:31:9
|
LL | _ => eprintln!("Not red"),
LL | #![deny(clippy::wildcard_enum_match_arm)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: wildcard match will miss any future added variants.
+error: wildcard match will miss any future added variants
--> $DIR/wildcard_enum_match_arm.rs:35: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 miss any future added variants.
+error: wildcard match will miss any future added variants
--> $DIR/wildcard_enum_match_arm.rs:39: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 miss any future added variants.
+error: wildcard match will miss any future added variants
--> $DIR/wildcard_enum_match_arm.rs:55:9
|
LL | _ => "No red",
| ^ help: try this: `Color::Red | Color::Green | Color::Blue | Color::Rgb(..) | Color::Cyan`
-error: match on non-exhaustive enum doesn't explicitly match all known variants.
+error: match on non-exhaustive enum doesn't explicitly match all known variants
--> $DIR/wildcard_enum_match_arm.rs:72:9
|
LL | _ => {},