Commit a4b60a9
authored
Unrolled build for #150099
Rollup merge of #150099 - GuillaumeGomez:field-handling, r=yotamofek
[rustdoc] Fix invalid handling of field followed by negated macro call
This is the bug uncovered in #150022. Once fixed Ill rebuild all compiler docs and see if we can enable the option for compiler docs. =D
It's a weird case where we extracted some tokens out of the iterator and then, when checking next items (from this iterator), it didn't find the `:` token, and therefore badly assumed the token kind.
The solution I came up with is to instead not extract tokens from the iterator and to count how many tokens are in the current path. So when iterate over the items, instead of having a mix of extracted tokens and tokens still inside the iterator, we now only iterate over the iterator.
The biggest change here is that `get_full_ident_path` will return an option instead of a `Vec`, and if it's contains `:` (one, not two), then it will return `None` and the `:` will be handled like any token and not like a path (which is more correct imo).
r? `@yotamofek`File tree
2 files changed
+70
-32
lines changed- src/librustdoc/html
- tests/rustdoc/macro-expansion
2 files changed
+70
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
835 | 849 | | |
836 | 850 | | |
837 | 851 | | |
| |||
903 | 917 | | |
904 | 918 | | |
905 | 919 | | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
918 | 931 | | |
919 | 932 | | |
920 | 933 | | |
| |||
957 | 970 | | |
958 | 971 | | |
959 | 972 | | |
960 | | - | |
961 | | - | |
962 | | - | |
| 973 | + | |
963 | 974 | | |
| 975 | + | |
964 | 976 | | |
965 | | - | |
| 977 | + | |
966 | 978 | | |
967 | | - | |
968 | | - | |
| 979 | + | |
969 | 980 | | |
| 981 | + | |
970 | 982 | | |
971 | 983 | | |
972 | 984 | | |
973 | 985 | | |
974 | | - | |
| 986 | + | |
975 | 987 | | |
976 | 988 | | |
977 | | - | |
| 989 | + | |
| 990 | + | |
978 | 991 | | |
979 | | - | |
| 992 | + | |
980 | 993 | | |
981 | 994 | | |
982 | 995 | | |
983 | | - | |
| 996 | + | |
| 997 | + | |
984 | 998 | | |
985 | 999 | | |
986 | 1000 | | |
987 | | - | |
988 | | - | |
989 | 1001 | | |
990 | | - | |
| 1002 | + | |
991 | 1003 | | |
992 | | - | |
993 | | - | |
994 | | - | |
| 1004 | + | |
| 1005 | + | |
995 | 1006 | | |
996 | | - | |
| 1007 | + | |
997 | 1008 | | |
998 | | - | |
| 1009 | + | |
999 | 1010 | | |
1000 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1001 | 1014 | | |
1002 | 1015 | | |
1003 | 1016 | | |
| |||
1243 | 1256 | | |
1244 | 1257 | | |
1245 | 1258 | | |
1246 | | - | |
1247 | 1259 | | |
1248 | 1260 | | |
1249 | 1261 | | |
| |||
Lines changed: 26 additions & 0 deletions
| 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments