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:
parent
1bc407fb84
commit
976438f78f
20 changed files with 115 additions and 23 deletions
|
@ -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]
|
||||
// |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue