]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/typeck/check/mod.rs
auto merge of #17501 : pcwalton/rust/improve-method-lookup-autoderef, r=nikomatsakis
[rust.git] / src / librustc / middle / typeck / check / mod.rs
index 97bbc8a9bc83d5993a6fa25f2f28f0a7314b1d2b..e49936f5a4c9ef4972a6a94843ad24753f6a5f93 100644 (file)
@@ -4107,6 +4107,9 @@ fn check_struct_fields_on_error(fcx: &FnCtxt,
         check_then_else(fcx, &**cond, &**then_blk, opt_else_expr.as_ref().map(|e| &**e),
                         id, expr.span, expected);
       }
+      ast::ExprIfLet(..) => {
+        tcx.sess.span_bug(expr.span, "non-desugared ExprIfLet");
+      }
       ast::ExprWhile(ref cond, ref body, _) => {
         check_expr_has_type(fcx, &**cond, ty::mk_bool());
         check_block_no_value(fcx, &**body);
@@ -4144,7 +4147,7 @@ fn check_struct_fields_on_error(fcx: &FnCtxt,
             fcx.write_nil(id);
         }
       }
-      ast::ExprMatch(ref discrim, ref arms) => {
+      ast::ExprMatch(ref discrim, ref arms, _) => {
         _match::check_match(fcx, expr, &**discrim, arms.as_slice());
       }
       ast::ExprFnBlock(_, ref decl, ref body) => {