Commit 1a8f698
authored
Rollup merge of rust-lang#92417 - dtolnay:printimpl, r=jackh726
Fix spacing and ordering of words in pretty printed Impl
Follow-up to rust-lang#92238 fixing one of the FIXMEs.
```rust
macro_rules! repro {
($item:item) => {
stringify!($item)
};
}
fn main() {
println!("{}", repro!(impl<T> Struct<T> {}));
println!("{}", repro!(impl<T> const Trait for T {}));
}
```
Before: `impl <T> Struct<T> {}`
After: `impl<T> Struct<T> {}`
Before: `impl const <T> Trait for T {}` 😿
After: `impl<T> const Trait for T {}`File tree
2 files changed
+13
-4
lines changed- compiler/rustc_ast_pretty/src/pprust
- src/test/ui/macros
2 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | | - | |
1291 | | - | |
| 1290 | + | |
1292 | 1291 | | |
1293 | | - | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1294 | 1295 | | |
1295 | 1296 | | |
1296 | 1297 | | |
1297 | 1298 | | |
| 1299 | + | |
| 1300 | + | |
1298 | 1301 | | |
1299 | 1302 | | |
1300 | 1303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
| 606 | + | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
614 | 620 | | |
615 | 621 | | |
616 | 622 | | |
| |||
0 commit comments