@@ -243,7 +243,7 @@ enum RibKind {
243243
244244 // We passed through a closure scope at the given node ID.
245245 // Translate upvars as appropriate.
246- ClosureRibKind ( NodeId /* func id */ , NodeId /* body id if proc or unboxed */ ) ,
246+ ClosureRibKind ( NodeId /* func id */ ) ,
247247
248248 // We passed through an impl or trait and are now in one of its
249249 // methods. Allow references to ty params that impl or trait
@@ -2605,18 +2605,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
26052605 DlDef ( d @ DefLocal ( _) ) => {
26062606 let node_id = d. def_id ( ) . node ;
26072607 let mut def = d;
2608- let mut last_proc_body_id = ast:: DUMMY_NODE_ID ;
26092608 for rib in ribs. iter ( ) {
26102609 match rib. kind {
26112610 NormalRibKind => {
26122611 // Nothing to do. Continue.
26132612 }
2614- ClosureRibKind ( function_id, maybe_proc_body ) => {
2613+ ClosureRibKind ( function_id) => {
26152614 let prev_def = def;
2616- if maybe_proc_body != ast:: DUMMY_NODE_ID {
2617- last_proc_body_id = maybe_proc_body;
2618- }
2619- def = DefUpvar ( node_id, function_id, last_proc_body_id) ;
2615+ def = DefUpvar ( node_id, function_id) ;
26202616
26212617 let mut seen = self . freevars_seen . borrow_mut ( ) ;
26222618 let seen = match seen. entry ( function_id) {
@@ -4523,7 +4519,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
45234519
45244520 ExprClosure ( capture_clause, _, ref fn_decl, ref block) => {
45254521 self . capture_mode_map . insert ( expr. id , capture_clause) ;
4526- self . resolve_function ( ClosureRibKind ( expr. id , ast :: DUMMY_NODE_ID ) ,
4522+ self . resolve_function ( ClosureRibKind ( expr. id ) ,
45274523 Some ( & * * fn_decl) , NoTypeParameters ,
45284524 & * * block) ;
45294525 }
0 commit comments