Remove trailling .s

This commit is contained in:
Daniel Wagner-Hall 2019-12-22 11:51:39 +00:00
parent c21b4ad7d4
commit 4f4444c429
2 changed files with 7 additions and 7 deletions

View file

@ -543,11 +543,11 @@ fn check_wild_enum_match(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
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("_"));
}
}

View file

@ -1,4 +1,4 @@
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"),
@ -10,25 +10,25 @@ note: lint level defined here
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 | _ => {},