File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
compiler/rustc_ast_pretty/src Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -347,10 +347,6 @@ impl Printer {
347
347
}
348
348
}
349
349
350
- fn scan_pop ( & mut self ) -> usize {
351
- self . scan_stack . pop_front ( ) . unwrap ( )
352
- }
353
-
354
350
fn scan_top ( & self ) -> usize {
355
351
* self . scan_stack . front ( ) . unwrap ( )
356
352
}
@@ -396,19 +392,19 @@ impl Printer {
396
392
match self . buf [ x] . token {
397
393
Token :: Begin ( _) => {
398
394
if k > 0 {
399
- self . scan_pop ( ) ;
395
+ self . scan_stack . pop_front ( ) . unwrap ( ) ;
400
396
self . buf [ x] . size += self . right_total ;
401
397
self . check_stack ( k - 1 ) ;
402
398
}
403
399
}
404
400
Token :: End => {
405
401
// paper says + not =, but that makes no sense.
406
- self . scan_pop ( ) ;
402
+ self . scan_stack . pop_front ( ) . unwrap ( ) ;
407
403
self . buf [ x] . size = 1 ;
408
404
self . check_stack ( k + 1 ) ;
409
405
}
410
406
_ => {
411
- self . scan_pop ( ) ;
407
+ self . scan_stack . pop_front ( ) . unwrap ( ) ;
412
408
self . buf [ x] . size += self . right_total ;
413
409
if k > 0 {
414
410
self . check_stack ( k) ;
You can’t perform that action at this time.
0 commit comments