Skip to content

Commit fe5c4ea

Browse files
committed
Eliminate a check_stack call on an empty scan stack
1 parent 377c9db commit fe5c4ea

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_ast_pretty/src

1 file changed

+1
-1
lines changed

compiler/rustc_ast_pretty/src/pp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ impl Printer {
315315
} else {
316316
self.right += 1;
317317
self.buf.advance_right();
318+
self.check_stack(0);
318319
}
319-
self.check_stack(0);
320320
self.buf[self.right] = BufEntry { token: Token::Break(b), size: -self.right_total };
321321
self.scan_stack.push_front(self.right);
322322
self.right_total += b.blank_space;

0 commit comments

Comments
 (0)