Skip to content

Commit

Permalink
wilcard_match_arm: run rustfmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aehmlo committed Jan 27, 2019
1 parent a7476d2 commit fefe55e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions clippy_lints/src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ declare_clippy_lint! {
/// ```rust
/// match x {
/// A => {},
/// _ => {}
/// _ => {},
/// }
/// ```
declare_clippy_lint! {
Expand Down Expand Up @@ -462,12 +462,14 @@ fn check_wild_err_arm(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
fn check_wild_match(cx: &LateContext<'_, '_>, arms: &[Arm]) {
for arm in arms {
if is_wild(&arm.pats[0]) {
span_note_and_lint(cx,
span_note_and_lint(
cx,
WILDCARD_MATCH_ARM,
arm.pats[0].span,
"wildcard match will miss any future added variants.",
arm.pats[0].span,
"to resolve, match each variant explicitly");
"to resolve, match each variant explicitly",
);
}
}
}
Expand Down

0 comments on commit fefe55e

Please sign in to comment.