@@ -955,8 +955,8 @@ pub fn lower_expr(lctx: &LoweringContext, e: &Expr) -> P<hir::Expr> {
955955 // might be `if let`.
956956 ExprIf ( ref cond, ref blk, ref else_opt) => {
957957 let else_opt = else_opt. as_ref ( ) . map ( |els| match els. node {
958- let _old_cached = CachedIdSetter :: new ( lctx, e. id ) ;
959958 ExprIfLet ( ..) => {
959+ let _old_cached = CachedIdSetter :: new ( lctx, e. id ) ;
960960 // wrap the if-let expr in a block
961961 let span = els. span ;
962962 let blk = P ( hir:: Block {
@@ -984,10 +984,10 @@ pub fn lower_expr(lctx: &LoweringContext, e: &Expr) -> P<hir::Expr> {
984984 hir:: ExprLoop ( lower_block ( lctx, body) ,
985985 opt_ident)
986986 }
987- ExprMatch ( ref expr, ref arms, ref source ) => {
987+ ExprMatch ( ref expr, ref arms) => {
988988 hir:: ExprMatch ( lower_expr ( lctx, expr) ,
989989 arms. iter ( ) . map ( |x| lower_arm ( lctx, x) ) . collect ( ) ,
990- lower_match_source ( lctx , source ) )
990+ hir :: MatchSource :: Normal )
991991 }
992992 ExprClosure ( capture_clause, ref decl, ref body) => {
993993 hir:: ExprClosure ( lower_capture_clause ( lctx, capture_clause) ,
@@ -1310,17 +1310,6 @@ pub fn lower_stmt(_lctx: &LoweringContext, s: &Stmt) -> P<hir::Stmt> {
13101310 }
13111311}
13121312
1313- pub fn lower_match_source( _lctx: & LoweringContext , m: & MatchSource ) -> hir:: MatchSource {
1314- match * m {
1315- MatchSource : : Normal => hir:: MatchSource :: Normal ,
1316- MatchSource : : IfLetDesugar { contains_else_clause } => {
1317- hir:: MatchSource :: IfLetDesugar { contains_else_clause : contains_else_clause }
1318- }
1319- MatchSource :: WhileLetDesugar => hir:: MatchSource :: WhileLetDesugar ,
1320- MatchSource : : ForLoopDesugar => hir:: MatchSource :: ForLoopDesugar ,
1321- }
1322- }
1323-
13241313pub fn lower_capture_clause ( _lctx : & LoweringContext , c : CaptureClause ) -> hir:: CaptureClause {
13251314 match c {
13261315 CaptureByValue => hir:: CaptureByValue ,
0 commit comments