@@ -243,7 +243,7 @@ enum RibKind {
243
243
244
244
// We passed through a closure scope at the given node ID.
245
245
// Translate upvars as appropriate.
246
- ClosureRibKind ( NodeId /* func id */ , NodeId /* body id if proc or unboxed */ ) ,
246
+ ClosureRibKind ( NodeId /* func id */ ) ,
247
247
248
248
// We passed through an impl or trait and are now in one of its
249
249
// methods. Allow references to ty params that impl or trait
@@ -2605,18 +2605,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
2605
2605
DlDef ( d @ DefLocal ( _) ) => {
2606
2606
let node_id = d. def_id ( ) . node ;
2607
2607
let mut def = d;
2608
- let mut last_proc_body_id = ast:: DUMMY_NODE_ID ;
2609
2608
for rib in ribs. iter ( ) {
2610
2609
match rib. kind {
2611
2610
NormalRibKind => {
2612
2611
// Nothing to do. Continue.
2613
2612
}
2614
- ClosureRibKind ( function_id, maybe_proc_body ) => {
2613
+ ClosureRibKind ( function_id) => {
2615
2614
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) ;
2620
2616
2621
2617
let mut seen = self . freevars_seen . borrow_mut ( ) ;
2622
2618
let seen = match seen. entry ( function_id) {
@@ -4523,7 +4519,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
4523
4519
4524
4520
ExprClosure ( capture_clause, _, ref fn_decl, ref block) => {
4525
4521
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 ) ,
4527
4523
Some ( & * * fn_decl) , NoTypeParameters ,
4528
4524
& * * block) ;
4529
4525
}
0 commit comments