Commit 682b4cb
authored
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-L2242File tree
2 files changed
+1
-2
lines changed- compiler/rustc_ast_pretty/src/pprust
- src/test/ui/macros
2 files changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2241 | 2241 | | |
2242 | 2242 | | |
2243 | 2243 | | |
2244 | | - | |
2245 | 2244 | | |
2246 | 2245 | | |
2247 | 2246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
0 commit comments