Produce a better error for irrefutable if let patterns

Modify ast::ExprMatch to include a new value of type ast::MatchSource,
making it easy to tell whether the match was written literally or
produced via desugaring. This allows us to customize error messages
appropriately.
This commit is contained in:
Kevin Ballard 2014-08-25 14:55:00 -07:00 committed by Jakub Wieczorek
parent 1bc407fb84
commit 976438f78f
20 changed files with 115 additions and 23 deletions

View file

@ -324,7 +324,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
expr_exit
}
ast::ExprMatch(ref discr, ref arms) => {
ast::ExprMatch(ref discr, ref arms, _) => {
//
// [pred]
// |