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.
diff --git a/src/librustc/middle/cfg/construct.rs b/src/librustc/middle/cfg/construct.rs
index 1f0171d..f370de3 100644
--- a/src/librustc/middle/cfg/construct.rs
+++ b/src/librustc/middle/cfg/construct.rs
@@ -324,7 +324,7 @@
expr_exit
}
- ast::ExprMatch(ref discr, ref arms) => {
+ ast::ExprMatch(ref discr, ref arms, _) => {
//
// [pred]
// |