diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-01 10:48:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-01 10:48:55 +0100 |
| commit | 682b4cbc4ee64fd3c4c548061e126496774f1435 (patch) | |
| tree | c36b1ba33d2b5c1c8d6f3f83700de7b80f6fcbaf /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff | |
| parent | a6e4d684aa37c0c2e63cb5abf7b0fcf8b404d69c (diff) | |
| parent | 2f25a4ab304dbbb17f8cae06025d4e98e8e7198a (diff) | |
| download | rust-682b4cbc4ee64fd3c4c548061e126496774f1435.tar.gz rust-682b4cbc4ee64fd3c4c548061e126496774f1435.zip | |
Rollup merge of #92412 - dtolnay:tryspace, r=Mark-Simulacrum
Fix double space in pretty printed TryBlock
Follow-up to #92238 fixing one of the FIXMEs.
```rust
macro_rules! repro {
($expr:expr) => {
stringify!($expr)
};
}
fn main() {
println!("{}", repro!(try {}));
}
```
Before: <code>try {}</code>
After: <code>try {}</code>
The `head` helper already appends a space:
https://github.com/rust-lang/rust/blob/2b67c30bfece00357d5fc09d99b49f21066f04ba/compiler/rustc_ast_pretty/src/pprust/state.rs#L654-L664
so doing `head` followed by `space` resulted in a double space:
https://github.com/rust-lang/rust/blob/2b67c30bfece00357d5fc09d99b49f21066f04ba/compiler/rustc_ast_pretty/src/pprust/state.rs#L2241-L2242
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
