diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-25 13:06:03 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-04-25 14:33:16 +1000 |
| commit | ee43aa356aa228b5cc8da41622855f4f2c07f8ab (patch) | |
| tree | a2d5a31f958339a1fbc070c6548cb772c6679724 /tests/pretty/hir-if-else.pp | |
| parent | 3d488f8e0c953f10852431f4c195e6b24cc6eec7 (diff) | |
| download | rust-ee43aa356aa228b5cc8da41622855f4f2c07f8ab.tar.gz rust-ee43aa356aa228b5cc8da41622855f4f2c07f8ab.zip | |
Fix some pretty printing indents.
Indents for `cbox` and `ibox` are 0 or `INDENT_UNIT` (4) except for a couple of places which are `INDENT_UNIT - 1` for no clear reason. This commit changes the three space indents to four spaces.
Diffstat (limited to 'tests/pretty/hir-if-else.pp')
| -rw-r--r-- | tests/pretty/hir-if-else.pp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/pretty/hir-if-else.pp b/tests/pretty/hir-if-else.pp index 551f24c6900..072e050d3e0 100644 --- a/tests/pretty/hir-if-else.pp +++ b/tests/pretty/hir-if-else.pp @@ -16,33 +16,33 @@ fn f(x: u32, { a = 1; } else if x < 2 - { - a = 2; - } else if x < 3 - { - a = 3; - } else if x < 4 { a = 4; } else { a = 5; } + { + a = 2; + } else if x < 3 + { + a = 3; + } else if x < 4 { a = 4; } else { a = 5; } - if x < y - { - a += 1; - a += 1; - a += 1; - a += 1; - a += 1; - a += 1; - } else { a += 1; a += 1; a += 1; a += 1; a += 1; a += 1; } + if x < y + { + a += 1; + a += 1; + a += 1; + a += 1; + a += 1; + a += 1; + } else { a += 1; a += 1; a += 1; a += 1; a += 1; a += 1; } - if x < 1 - { - if x < 2 - { - if x < 3 - { - a += 1; - } else if x < 4 - { a += 1; if x < 5 { a += 1; } } - } else if x < 6 { a += 1; } } - } + if x < 1 + { + if x < 2 + { + if x < 3 + { + a += 1; + } else if x < 4 + { a += 1; if x < 5 { a += 1; } } + } else if x < 6 { a += 1; } } + } - fn main() { f(3, 4); } + fn main() { f(3, 4); } |
