We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 947a09a commit 0490e43Copy full SHA for 0490e43
compiler/rustc_ast_pretty/src/pp.rs
@@ -335,14 +335,14 @@ impl Printer {
335
}
336
337
fn check_stream(&mut self) {
338
- if self.right_total - self.left_total > self.space {
+ while self.right_total - self.left_total > self.space {
339
if self.scan_stack.back() == Some(&self.left) {
340
self.scan_stack.pop_back().unwrap();
341
self.buf[self.left].size = SIZE_INFINITY;
342
343
self.advance_left();
344
- if self.left != self.right {
345
- self.check_stream();
+ if self.left == self.right {
+ break;
346
347
348
0 commit comments