Skip to content

Commit

Permalink
Remove trailling .s
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Dec 22, 2019
1 parent c21b4ad commit 4f4444c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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("_"));
}
}
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/wildcard_enum_match_arm.stderr
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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 | _ => {},
Expand Down

0 comments on commit 4f4444c

Please sign in to comment.