-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit f948c79
authored
Rollup merge of #142472 - GuillaumeGomez:doc-attribute-attribute, r=fmease
Add new `doc(attribute = "...")` attribute
Fixes #141123.
The implementation and purpose of this new `#[doc(attribute = "...")]` attribute is very close to `#[doc(keyword = "...")]`. Which means that luckily for us, most of the code needed was already in place and `@Noratrieb` nicely wrote a first draft that helped me implement this new attribute very fast.
Now with all this said, there is one thing I didn't do yet: adding a `rustdoc-js-std` test. I added GUI tests with search results for attributes so should be fine but I still plan on adding one for it once documentation for builtin attributes will be written into the core/std libs.
You can test it [here](https://rustdoc.crud.net/imperio/doc-attribute-attribute/foo/index.html).
cc `@Noratrieb` `@Veykril`File tree
41 files changed
+376
-55
lines changed- compiler
- rustc_ast_passes/src
- rustc_passes
- src
- rustc_resolve/src
- rustc_span/src
- src
- doc/rustdoc/src
- librustdoc
- clean
- formats
- html
- render
- static
- css
- js
- json
- passes
- rustdoc-json-types
- tools/jsondoclint/src
- tests
- rustdoc-gui
- src/test_docs
- rustdoc-json
- rustdoc-ui
- rustdoc
- ui/feature-gates
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+376
-55
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
191 | + | ||
191 | 192 |
| |
192 | 193 |
| |
193 | 194 |
| |
|
Lines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
148 | 152 |
| |
149 | 153 |
| |
150 | 154 |
| |
| |||
173 | 177 |
| |
174 | 178 |
| |
175 | 179 |
| |
176 | - | ||
177 | - | ||
180 | + | ||
181 | + | ||
182 | + | ||
183 | + | ||
184 | + | ||
178 | 185 |
| |
179 | 186 |
| |
180 | 187 |
| |
181 | 188 |
| |
182 | 189 |
| |
183 | - | ||
184 | - | ||
185 | - | ||
186 | 190 |
| |
187 | 191 |
| |
188 | 192 |
| |
|
Lines changed: 68 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
102 | 117 |
| |
103 | 118 |
| |
104 | 119 |
| |
| |||
853 | 868 |
| |
854 | 869 |
| |
855 | 870 |
| |
856 | - | ||
871 | + | ||
872 | + | ||
873 | + | ||
874 | + | ||
875 | + | ||
876 | + | ||
857 | 877 |
| |
858 | 878 |
| |
859 | 879 |
| |
860 | 880 |
| |
861 | 881 |
| |
862 | 882 |
| |
863 | 883 |
| |
864 | - | ||
884 | + | ||
885 | + | ||
886 | + | ||
887 | + | ||
888 | + | ||
889 | + | ||
865 | 890 |
| |
866 | - | ||
891 | + | ||
867 | 892 |
| |
868 | 893 |
| |
869 | 894 |
| |
| |||
873 | 898 |
| |
874 | 899 |
| |
875 | 900 |
| |
876 | - | ||
901 | + | ||
902 | + | ||
903 | + | ||
904 | + | ||
877 | 905 |
| |
878 | 906 |
| |
879 | 907 |
| |
880 | 908 |
| |
881 | - | ||
909 | + | ||
910 | + | ||
911 | + | ||
912 | + | ||
882 | 913 |
| |
883 | 914 |
| |
884 | 915 |
| |
885 | - | ||
886 | - | ||
887 | - | ||
888 | - | ||
889 | - | ||
916 | + | ||
917 | + | ||
918 | + | ||
919 | + | ||
920 | + | ||
921 | + | ||
922 | + | ||
923 | + | ||
924 | + | ||
925 | + | ||
926 | + | ||
927 | + | ||
928 | + | ||
929 | + | ||
930 | + | ||
931 | + | ||
932 | + | ||
890 | 933 |
| |
891 | 934 |
| |
892 | 935 |
| |
| |||
1146 | 1189 |
| |
1147 | 1190 |
| |
1148 | 1191 |
| |
1149 | - | ||
1192 | + | ||
1193 | + | ||
1194 | + | ||
1195 | + | ||
1196 | + | ||
1197 | + | ||
1198 | + | ||
1199 | + | ||
1200 | + | ||
1201 | + | ||
1202 | + | ||
1203 | + | ||
1204 | + | ||
1205 | + | ||
1206 | + | ||
1150 | 1207 |
| |
1151 | 1208 |
| |
1152 | 1209 |
| |
|
Lines changed: 15 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 | - | ||
199 | - | ||
198 | + | ||
199 | + | ||
200 | 200 |
| |
201 | 201 |
| |
202 | + | ||
202 | 203 |
| |
203 | 204 |
| |
204 | 205 |
| |
| |||
211 | 212 |
| |
212 | 213 |
| |
213 | 214 |
| |
214 | - | ||
215 | - | ||
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | ||
223 | + | ||
224 | + | ||
225 | + | ||
216 | 226 |
| |
217 | 227 |
| |
228 | + | ||
218 | 229 |
| |
219 | 230 |
| |
220 | 231 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5016 | 5016 |
| |
5017 | 5017 |
| |
5018 | 5018 |
| |
5019 | - | ||
5019 | + | ||
5020 | 5020 |
| |
5021 | 5021 |
| |
5022 | 5022 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
373 | 373 |
| |
374 | 374 |
| |
375 | 375 |
| |
376 | - | ||
377 | - | ||
376 | + | ||
377 | + | ||
378 | 378 |
| |
379 | 379 |
| |
380 | 380 |
| |
381 | 381 |
| |
382 | 382 |
| |
383 | 383 |
| |
384 | 384 |
| |
385 | - | ||
385 | + | ||
386 | 386 |
| |
387 | 387 |
| |
388 | 388 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
541 | 541 |
| |
542 | 542 |
| |
543 | 543 |
| |
544 | + | ||
544 | 545 |
| |
545 | 546 |
| |
546 | 547 |
| |
|
Lines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
199 | - | ||
199 | + | ||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
214 | + | ||
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | ||
219 | + | ||
220 | + | ||
221 | + | ||
222 | + | ||
223 | + | ||
224 | + | ||
225 | + | ||
226 | + | ||
227 | + | ||
228 | + | ||
229 | + | ||
230 | + | ||
214 | 231 |
| |
215 | 232 |
| |
216 | 233 |
| |
|
Lines changed: 42 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
229 | - | ||
229 | + | ||
230 | + | ||
231 | + | ||
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | ||
236 | + | ||
237 | + | ||
238 | + | ||
239 | + | ||
240 | + | ||
241 | + | ||
242 | + | ||
243 | + | ||
230 | 244 |
| |
231 | 245 |
| |
232 | - | ||
246 | + | ||
233 | 247 |
| |
234 | 248 |
| |
235 | - | ||
236 | - | ||
237 | - | ||
249 | + | ||
250 | + | ||
238 | 251 |
| |
239 | 252 |
| |
240 | 253 |
| |
| |||
592 | 605 |
| |
593 | 606 |
| |
594 | 607 |
| |
608 | + | ||
609 | + | ||
610 | + | ||
611 | + | ||
612 | + | ||
613 | + | ||
614 | + | ||
615 | + | ||
616 | + | ||
617 | + | ||
618 | + | ||
619 | + | ||
620 | + | ||
621 | + | ||
595 | 622 |
| |
596 | 623 |
| |
597 | 624 |
| |
| |||
735 | 762 |
| |
736 | 763 |
| |
737 | 764 |
| |
738 | - | ||
765 | + | ||
766 | + | ||
767 | + | ||
739 | 768 |
| |
740 | 769 |
| |
741 | 770 |
| |
| |||
942 | 971 |
| |
943 | 972 |
| |
944 | 973 |
| |
974 | + | ||
975 | + | ||
945 | 976 |
| |
977 | + | ||
978 | + | ||
979 | + | ||
946 | 980 |
| |
947 | 981 |
| |
948 | 982 |
| |
| |||
983 | 1017 |
| |
984 | 1018 |
| |
985 | 1019 |
| |
986 | - | ||
1020 | + | ||
1021 | + | ||
987 | 1022 |
| |
988 | 1023 |
| |
989 | 1024 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
63 | + | ||
63 | 64 |
| |
64 | 65 |
| |
65 | 66 |
| |
| |||
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
77 | + | ||
78 | + | ||
79 | + | ||
76 | 80 |
| |
77 | 81 |
| |
78 | 82 |
| |
|
0 commit comments