Commit a397a90
committed
Print
Instead of using AST pretty printing.
This is a step towards removing `token::Interpolated`, which will
eventually be replaced with a token stream within invisible delimiters.
The commit increases `stringify!` consistency, because AST pretty
printing is no longer ever used for it.
Test changes:
- tests/ui/macros/stringify.rs: this used to test both token stream
pretty printing and AST pretty printing via different ways of invoking
of `stringify!` (i.e. `$expr` vs `$tt`). But those two different
invocations now give the same result. This removes the need for the
`c2!` macro.
- tests/ui/macros/trace_faulty_macros.rs: there is some sub-optimal
spacing in the printing of `A { a : a, b : 0, c : _, .. }`, which will
be fixed in the next commit. The spacing of `1+1` improves -- it now
matches the formatting in the source code.
- tests/ui/proc-macro/*: minor improvements where small differences
between `INPUT (DISPLAY)` output and `DEEP-RE-COLLECTED (DISPLAY)`
output disappear.token::Interpolated with token stream pretty printing.1 parent b21b74b commit a397a90
File tree
12 files changed
+127
-236
lines changed- compiler
- rustc_ast_pretty/src/pprust
- rustc_expand/src/mbe
- rustc_parse/src/parser
- tests/ui
- macros
- proc-macro
12 files changed
+127
-236
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
528 | 531 | | |
529 | 532 | | |
530 | 533 | | |
| |||
849 | 852 | | |
850 | 853 | | |
851 | 854 | | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
864 | 860 | | |
865 | 861 | | |
866 | 862 | | |
| |||
994 | 990 | | |
995 | 991 | | |
996 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
| |||
2039 | 2039 | | |
2040 | 2040 | | |
2041 | 2041 | | |
2042 | | - | |
2043 | | - | |
2044 | | - | |
2045 | | - | |
2046 | 2042 | | |
2047 | 2043 | | |
2048 | 2044 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
321 | 325 | | |
322 | 326 | | |
323 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
0 commit comments