File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1382,9 +1382,14 @@ impl<'a> Printer<'a> {
13821382 // HACK(eddyb) also claim all yet-unclaimed parent scopes.
13831383 let stack = & mut reusable_dbg_scope_stack;
13841384 stack. clear ( ) ;
1385- stack. extend (
1386- scope. parents ( cx) . take_while ( |parent| !claimed. contains ( parent) ) ,
1387- ) ;
1385+ stack. extend ( scope. parents ( cx) . take_while ( |parent| {
1386+ claimed. get_index_of ( parent) . is_none_or ( |parent_claim_idx| {
1387+ // HACK(eddyb) scopes later in `newly_claimed_range`
1388+ // get treated as unclaimed, in order to claim them
1389+ // even earlier (just before they're first needed).
1390+ parent_claim_idx > claim_idx
1391+ } )
1392+ } ) ) ;
13881393 for parent in stack. drain ( ..) . rev ( ) {
13891394 placements. insert ( parent) ;
13901395 }
You can’t perform that action at this time.
0 commit comments