File tree 1 file changed +4
-7
lines changed
compiler/rustc_ast_pretty/src
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -364,11 +364,6 @@ impl Printer {
364
364
}
365
365
}
366
366
367
- fn print_newline ( & mut self , amount : isize ) {
368
- self . out . push ( '\n' ) ;
369
- self . pending_indentation = amount;
370
- }
371
-
372
367
fn get_top ( & self ) -> PrintFrame {
373
368
* self
374
369
. print_stack
@@ -396,12 +391,14 @@ impl Printer {
396
391
self . space -= token. blank_space ;
397
392
}
398
393
PrintFrame :: Broken { offset, breaks : Breaks :: Consistent } => {
399
- self . print_newline ( offset + token. offset ) ;
394
+ self . out . push ( '\n' ) ;
395
+ self . pending_indentation = offset + token. offset ;
400
396
self . space = self . margin - ( offset + token. offset ) ;
401
397
}
402
398
PrintFrame :: Broken { offset, breaks : Breaks :: Inconsistent } => {
403
399
if size > self . space {
404
- self . print_newline ( offset + token. offset ) ;
400
+ self . out . push ( '\n' ) ;
401
+ self . pending_indentation = offset + token. offset ;
405
402
self . space = self . margin - ( offset + token. offset ) ;
406
403
} else {
407
404
self . pending_indentation += token. blank_space ;
You can’t perform that action at this time.
0 commit comments