File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
compiler/rustc_ast_pretty/src Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -364,11 +364,6 @@ impl Printer {
364364 }
365365 }
366366
367- fn print_newline ( & mut self , amount : isize ) {
368- self . out . push ( '\n' ) ;
369- self . pending_indentation = amount;
370- }
371-
372367 fn get_top ( & self ) -> PrintFrame {
373368 * self
374369 . print_stack
@@ -396,12 +391,14 @@ impl Printer {
396391 self . space -= token. blank_space ;
397392 }
398393 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 ;
400396 self . space = self . margin - ( offset + token. offset ) ;
401397 }
402398 PrintFrame :: Broken { offset, breaks : Breaks :: Inconsistent } => {
403399 if size > self . space {
404- self . print_newline ( offset + token. offset ) ;
400+ self . out . push ( '\n' ) ;
401+ self . pending_indentation = offset + token. offset ;
405402 self . space = self . margin - ( offset + token. offset ) ;
406403 } else {
407404 self . pending_indentation += token. blank_space ;
You can’t perform that action at this time.
0 commit comments