]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #18729 : bkoropoff/rust/issue-18711, r=cmr
authorbors <bors@rust-lang.org>
Sat, 8 Nov 2014 05:01:34 +0000 (05:01 +0000)
committerbors <bors@rust-lang.org>
Sat, 8 Nov 2014 05:01:34 +0000 (05:01 +0000)
Closes #18711

1  2 
src/librustc/middle/trans/closure.rs

index 4535b14fbccfb278cdc1342e1285ae37227e3fcf,8c73baf2b677057e6331e8445becb8e515b29582..4f25e4f195136134554452c881500f1d7d51fcce
@@@ -486,13 -480,11 +486,12 @@@ pub fn trans_unboxed_closure<'blk, 'tcx
      let closure_id = ast_util::local_def(id);
      let llfn = get_or_create_declaration_if_unboxed_closure(
          bcx,
 -        closure_id).unwrap();
 +        closure_id,
 +        &bcx.fcx.param_substs.substs).unwrap();
  
-     let unboxed_closures = bcx.tcx().unboxed_closures.borrow();
-     let function_type = (*unboxed_closures)[closure_id]
-                                         .closure_type
-                                         .clone();
+     let function_type = (*bcx.tcx().unboxed_closures.borrow())[closure_id]
+                                                               .closure_type
+                                                               .clone();
      let function_type = ty::mk_closure(bcx.tcx(), function_type);
  
      let freevars: Vec<ty::Freevar> =