Skip to content

Commit 16ccdba

Browse files
committed
Use explicit case rather than catch-all
1 parent 0d6dafa commit 16ccdba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/middle/check_match.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ fn check_arms(cx: &MatchCheckCtxt, arms: &[(Vec<P<Pat>>, Option<&Expr>)], source
284284
span_err!(cx.tcx.sess, span, E0165, "irrefutable while-let pattern");
285285
},
286286

287-
_ => span_err!(cx.tcx.sess, pat.span, E0001, "unreachable pattern")
287+
MatchNormal => {
288+
span_err!(cx.tcx.sess, pat.span, E0001, "unreachable pattern")
289+
},
288290
}
289291
}
290292
Useful => (),

0 commit comments

Comments
 (0)