This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1044,9 +1044,9 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
1044
1044
debug ! ( "resolve_expr - fixing up counts to {}" , visitor. expr_and_pat_count) ;
1045
1045
1046
1046
for scope in target_scopes {
1047
- let ( span , count ) = visitor. scope_tree . yield_in_scope . get_mut ( & scope) . unwrap ( ) ;
1048
- let count = * count ;
1049
- let span = * span;
1047
+ let mut yield_data = visitor. scope_tree . yield_in_scope . get_mut ( & scope) . unwrap ( ) ;
1048
+ let count = yield_data . expr_and_pat_count ;
1049
+ let span = yield_data . span ;
1050
1050
1051
1051
// expr_and_pat_count never decreases. Since we recorded counts in yield_in_scope
1052
1052
// before walking the left-hand side, it should be impossible for the recorded
@@ -1059,7 +1059,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
1059
1059
debug ! ( "resolve_expr - increasing count for scope {:?} from {} to {} at span {:?}" ,
1060
1060
scope, count, new_count, span) ;
1061
1061
1062
- visitor . scope_tree . yield_in_scope . insert ( scope , ( span , new_count) ) ;
1062
+ yield_data . expr_and_pat_count = new_count;
1063
1063
}
1064
1064
1065
1065
}
You can’t perform that action at this time.
0 commit comments