diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-30 16:05:47 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-03 12:46:51 +1000 | 
| commit | 809e5b5ed17f6cede5945939bb7f10c5282d9b53 (patch) | |
| tree | 79aa19c0528fcecf40cc547e792ceae67ce12790 /compiler/rustc_hir_pretty/src/lib.rs | |
| parent | e1a177bbba2b1297c33e2838f8b2b72ab5f62ecf (diff) | |
| download | rust-809e5b5ed17f6cede5945939bb7f10c5282d9b53.tar.gz rust-809e5b5ed17f6cede5945939bb7f10c5282d9b53.zip | |
Fix some hir pretty-printing over-indenting.
Diffstat (limited to 'compiler/rustc_hir_pretty/src/lib.rs')
| -rw-r--r-- | compiler/rustc_hir_pretty/src/lib.rs | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index 1e260b2dda4..0916885cb17 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -1503,7 +1503,7 @@ impl<'a> State<'a> { } hir::ExprKind::DropTemps(init) => { // Print `{`: - let cb = self.cbox(INDENT_UNIT); + let cb = self.cbox(0); let ib = self.ibox(0); self.bopen(ib); @@ -1530,12 +1530,14 @@ impl<'a> State<'a> { self.print_ident(label.ident); self.word_space(":"); } - let (cb, ib) = self.head("loop"); + let cb = self.cbox(0); + let ib = self.ibox(0); + self.word_nbsp("loop"); self.print_block(blk, cb, ib); } hir::ExprKind::Match(expr, arms, _) => { - let cb = self.cbox(INDENT_UNIT); - let ib = self.ibox(INDENT_UNIT); + let cb = self.cbox(0); + let ib = self.ibox(0); self.word_nbsp("match"); self.print_expr_as_cond(expr); self.space(); | 
