diff options
| author | Daniel Wagner-Hall <dawagner@gmail.com> | 2019-12-22 11:51:39 +0000 |
|---|---|---|
| committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2019-12-22 11:51:39 +0000 |
| commit | 4f4444c429a49c52461c528ba0b2f2be01f8ae04 (patch) | |
| tree | 5449736aeea1dc4c858635f45036dca4b7b160a0 | |
| parent | c21b4ad7d46118c1fd0747b52dd3f052aee79021 (diff) | |
| download | rust-4f4444c429a49c52461c528ba0b2f2be01f8ae04.tar.gz rust-4f4444c429a49c52461c528ba0b2f2be01f8ae04.zip | |
Remove trailling .s
| -rw-r--r-- | clippy_lints/src/matches.rs | 4 | ||||
| -rw-r--r-- | tests/ui/wildcard_enum_match_arm.stderr | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 4c4a64f4ac1..fc265c5231b 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -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("_")); } } diff --git a/tests/ui/wildcard_enum_match_arm.stderr b/tests/ui/wildcard_enum_match_arm.stderr index 1020542c1e7..735f610b7e5 100644 --- a/tests/ui/wildcard_enum_match_arm.stderr +++ b/tests/ui/wildcard_enum_match_arm.stderr @@ -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 | _ => {}, |
