Skip to content

Commit

Permalink
Fix fallout from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Jun 22, 2019
1 parent 0fa945e commit 8450289
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/middle/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,9 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
debug!("resolve_expr - fixing up counts to {}", visitor.expr_and_pat_count);

for scope in target_scopes {
let (span, count) = visitor.scope_tree.yield_in_scope.get_mut(&scope).unwrap();
let count = *count;
let span = *span;
let mut yield_data = visitor.scope_tree.yield_in_scope.get_mut(&scope).unwrap();
let count = yield_data.expr_and_pat_count;
let span = yield_data.span;

// expr_and_pat_count never decreases. Since we recorded counts in yield_in_scope
// before walking the left-hand side, it should be impossible for the recorded
Expand All @@ -1059,7 +1059,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
debug!("resolve_expr - increasing count for scope {:?} from {} to {} at span {:?}",
scope, count, new_count, span);

visitor.scope_tree.yield_in_scope.insert(scope, (span, new_count));
yield_data.expr_and_pat_count = new_count;
}

}
Expand Down

0 comments on commit 8450289

Please sign in to comment.