From 336be1d644ff2d07f6d9188afd7fbd33a6c1671a Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 2 Aug 2012 23:53:21 -0700 Subject: [PATCH] Fix build breakage --- src/rustc/middle/typeck/check.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rustc/middle/typeck/check.rs b/src/rustc/middle/typeck/check.rs index 35b2560f00c0..cf25eaf06075 100644 --- a/src/rustc/middle/typeck/check.rs +++ b/src/rustc/middle/typeck/check.rs @@ -1475,11 +1475,10 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, capture::check_capture_clause(tcx, expr.id, cap_clause); } ast::expr_fn_block(decl, body, cap_clause) { + // Take the prototype from the expected type, but default to block: let proto = unpack_expected(fcx, expected, |sty| alt sty { ty::ty_fn({proto, _}) { some(proto) } _ { none } } ).get_default(ast::proto_box); - // Take the prototype from the expected type, but default to block: - let proto = proto_1.get_default(ast::proto_box); check_expr_fn(fcx, expr, proto, decl, body, false, expected); capture::check_capture_clause(tcx, expr.id, cap_clause); }