Skip to content

Commit

Permalink
Use explicit case rather than catch-all
Browse files Browse the repository at this point in the history
  • Loading branch information
hydhknn committed Oct 11, 2014
1 parent 0d6dafa commit 16ccdba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc/middle/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ fn check_arms(cx: &MatchCheckCtxt, arms: &[(Vec<P<Pat>>, Option<&Expr>)], source
span_err!(cx.tcx.sess, span, E0165, "irrefutable while-let pattern");
},

_ => span_err!(cx.tcx.sess, pat.span, E0001, "unreachable pattern")
MatchNormal => {
span_err!(cx.tcx.sess, pat.span, E0001, "unreachable pattern")
},
}
}
Useful => (),
Expand Down

5 comments on commit 16ccdba

@bors
Copy link
Contributor

@bors bors commented on 16ccdba Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at jgallagher@16ccdba

@bors
Copy link
Contributor

@bors bors commented on 16ccdba Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jgallagher/rust/while-let = 16ccdba into auto

@bors
Copy link
Contributor

@bors bors commented on 16ccdba Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jgallagher/rust/while-let = 16ccdba merged ok, testing candidate = c7e0724

@bors
Copy link
Contributor

@bors bors commented on 16ccdba Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 16ccdba Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = c7e0724

Please sign in to comment.