Fix panic due to overly long borrow of RefCell

Closes #18711
This commit is contained in:
Brian Koropoff 2014-11-06 19:31:56 -08:00
parent 45cbdec417
commit bb0a719434

View file

@ -482,8 +482,7 @@ pub fn trans_unboxed_closure<'blk, 'tcx>(
bcx,
closure_id).unwrap();
let unboxed_closures = bcx.tcx().unboxed_closures.borrow();
let function_type = (*unboxed_closures)[closure_id]
let function_type = (*bcx.tcx().unboxed_closures.borrow())[closure_id]
.closure_type
.clone();
let function_type = ty::mk_closure(bcx.tcx(), function_type);