Commit b194206
authored
Rollup merge of rust-lang#57915 - petrochenkov:notto-disu, r=zackmdavis
Pretty print `$crate` as `crate` or `crate_name` in more cases
So, people do parse output of `--pretty=expanded` (sigh), so covering only the legacy proc-macro case (like it was done in rust-lang#57155) is not enough.
This PRs resolves all `$crate`s produced by macros, so they are all printed in the parseable form `$crate::foo` -> `crate::foo` or `crate_name::foo`.
Fixes rust-lang#38016 (comment)
Fixes rust-lang#57155 (comment)File tree
6 files changed
+36
-27
lines changed- src
- librustc_resolve
- libsyntax/ext
- test/pretty
6 files changed
+36
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | 540 | | |
542 | | - | |
543 | | - | |
544 | | - | |
| 541 | + | |
545 | 542 | | |
546 | 543 | | |
547 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | 138 | | |
151 | 139 | | |
152 | 140 | | |
| |||
742 | 730 | | |
743 | 731 | | |
744 | 732 | | |
745 | | - | |
| 733 | + | |
746 | 734 | | |
747 | 735 | | |
748 | 736 | | |
| |||
776 | 764 | | |
777 | 765 | | |
778 | 766 | | |
779 | | - | |
| 767 | + | |
780 | 768 | | |
781 | 769 | | |
782 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
446 | 449 | | |
447 | 450 | | |
448 | 451 | | |
| |||
574 | 577 | | |
575 | 578 | | |
576 | 579 | | |
577 | | - | |
578 | | - | |
579 | 580 | | |
580 | 581 | | |
581 | 582 | | |
| |||
917 | 918 | | |
918 | 919 | | |
919 | 920 | | |
920 | | - | |
921 | | - | |
922 | 921 | | |
923 | 922 | | |
924 | 923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments