]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-js/doc-alias.js
Auto merge of #107644 - Zoxc:query-cache-tweak, r=cjgillot
[rust.git] / tests / rustdoc-js / doc-alias.js
1 const QUERY = [
2     'StructItem',
3     'StructFieldItem',
4     'StructMethodItem',
5     'ImplTraitItem',
6     'StructImplConstItem',
7     'ImplTraitFunction',
8     'EnumItem',
9     'VariantItem',
10     'EnumMethodItem',
11     'TypedefItem',
12     'TraitItem',
13     'TraitTypeItem',
14     'AssociatedConstItem',
15     'TraitFunctionItem',
16     'FunctionItem',
17     'ModuleItem',
18     'ConstItem',
19     'StaticItem',
20     'UnionItem',
21     'UnionFieldItem',
22     'UnionMethodItem',
23     'MacroItem',
24 ];
25
26 const EXPECTED = [
27     {
28         // StructItem
29         'others': [
30             {
31                 'path': 'doc_alias',
32                 'name': 'Struct',
33                 'alias': 'StructItem',
34                 'href': '../doc_alias/struct.Struct.html',
35                 'is_alias': true
36             },
37         ],
38     },
39     {
40         // StructFieldItem
41         'others': [
42             {
43                 'path': 'doc_alias::Struct',
44                 'name': 'field',
45                 'alias': 'StructFieldItem',
46                 'href': '../doc_alias/struct.Struct.html#structfield.field',
47                 'is_alias': true
48             },
49         ],
50     },
51     {
52         // StructMethodItem
53         'others': [
54             {
55                 'path': 'doc_alias::Struct',
56                 'name': 'method',
57                 'alias': 'StructMethodItem',
58                 'href': '../doc_alias/struct.Struct.html#method.method',
59                 'is_alias': true
60             },
61         ],
62     },
63     {
64         // ImplTraitItem
65         'others': [],
66     },
67     {
68         // StructImplConstItem
69         'others': [
70             {
71                 'path': 'doc_alias::Struct',
72                 'name': 'ImplConstItem',
73                 'alias': 'StructImplConstItem',
74                 'href': '../doc_alias/struct.Struct.html#associatedconstant.ImplConstItem',
75                 'is_alias': true
76             },
77         ],
78     },
79     {
80         // ImplTraitFunction
81         'others': [
82             {
83                 'path': 'doc_alias::Struct',
84                 'name': 'function',
85                 'alias': 'ImplTraitFunction',
86                 'href': '../doc_alias/struct.Struct.html#method.function',
87                 'is_alias': true
88             },
89         ],
90     },
91     {
92         // EnumItem
93         'others': [
94             {
95                 'path': 'doc_alias',
96                 'name': 'Enum',
97                 'alias': 'EnumItem',
98                 'href': '../doc_alias/enum.Enum.html',
99                 'is_alias': true
100             },
101         ],
102     },
103     {
104         // VariantItem
105         'others': [
106             {
107                 'path': 'doc_alias::Enum',
108                 'name': 'Variant',
109                 'alias': 'VariantItem',
110                 'href': '../doc_alias/enum.Enum.html#variant.Variant',
111                 'is_alias': true
112             },
113         ],
114     },
115     {
116         // EnumMethodItem
117         'others': [
118             {
119                 'path': 'doc_alias::Enum',
120                 'name': 'method',
121                 'alias': 'EnumMethodItem',
122                 'href': '../doc_alias/enum.Enum.html#method.method',
123                 'is_alias': true
124             },
125         ],
126     },
127     {
128         // TypedefItem
129         'others': [
130             {
131                 'path': 'doc_alias',
132                 'name': 'Typedef',
133                 'alias': 'TypedefItem',
134                 'href': '../doc_alias/type.Typedef.html',
135                 'is_alias': true
136             },
137         ],
138     },
139     {
140         // TraitItem
141         'others': [
142             {
143                 'path': 'doc_alias',
144                 'name': 'Trait',
145                 'alias': 'TraitItem',
146                 'href': '../doc_alias/trait.Trait.html',
147                 'is_alias': true
148             },
149         ],
150     },
151     {
152         // TraitTypeItem
153         'others': [
154             {
155                 'path': 'doc_alias::Trait',
156                 'name': 'Target',
157                 'alias': 'TraitTypeItem',
158                 'href': '../doc_alias/trait.Trait.html#associatedtype.Target',
159                 'is_alias': true
160             },
161         ],
162     },
163     {
164         // AssociatedConstItem
165         'others': [
166             {
167                 'path': 'doc_alias::Trait',
168                 'name': 'AssociatedConst',
169                 'alias': 'AssociatedConstItem',
170                 'href': '../doc_alias/trait.Trait.html#associatedconstant.AssociatedConst',
171                 'is_alias': true
172             },
173         ],
174     },
175     {
176         // TraitFunctionItem
177         'others': [
178             {
179                 'path': 'doc_alias::Trait',
180                 'name': 'function',
181                 'alias': 'TraitFunctionItem',
182                 'href': '../doc_alias/trait.Trait.html#tymethod.function',
183                 'is_alias': true
184             },
185         ],
186     },
187     {
188         // FunctionItem
189         'others': [
190             {
191                 'path': 'doc_alias',
192                 'name': 'function',
193                 'alias': 'FunctionItem',
194                 'href': '../doc_alias/fn.function.html',
195                 'is_alias': true
196             },
197         ],
198     },
199     {
200         // ModuleItem
201         'others': [
202             {
203                 'path': 'doc_alias',
204                 'name': 'Module',
205                 'alias': 'ModuleItem',
206                 'href': '../doc_alias/Module/index.html',
207                 'is_alias': true
208             },
209         ],
210     },
211     {
212         // ConstItem
213         'others': [
214             {
215                 'path': 'doc_alias',
216                 'name': 'Const',
217                 'alias': 'ConstItem',
218                 'href': '../doc_alias/constant.Const.html',
219                 'is_alias': true
220             },
221             {
222                 'path': 'doc_alias::Struct',
223                 'name': 'ImplConstItem',
224             },
225         ],
226     },
227     {
228         // StaticItem
229         'others': [
230             {
231                 'path': 'doc_alias',
232                 'name': 'Static',
233                 'alias': 'StaticItem',
234                 'href': '../doc_alias/static.Static.html',
235                 'is_alias': true
236             },
237         ],
238     },
239     {
240         // UnionItem
241         'others': [
242             {
243                 'path': 'doc_alias',
244                 'name': 'Union',
245                 'alias': 'UnionItem',
246                 'href': '../doc_alias/union.Union.html',
247                 'is_alias': true
248             },
249             // Not an alias!
250             {
251                 'path': 'doc_alias::Union',
252                 'name': 'union_item',
253                 'href': '../doc_alias/union.Union.html#structfield.union_item'
254             },
255         ],
256     },
257     {
258         // UnionFieldItem
259         'others': [
260             {
261                 'path': 'doc_alias::Union',
262                 'name': 'union_item',
263                 'alias': 'UnionFieldItem',
264                 'href': '../doc_alias/union.Union.html#structfield.union_item',
265                 'is_alias': true
266             },
267         ],
268     },
269     {
270         // UnionMethodItem
271         'others': [
272             {
273                 'path': 'doc_alias::Union',
274                 'name': 'method',
275                 'alias': 'UnionMethodItem',
276                 'href': '../doc_alias/union.Union.html#method.method',
277                 'is_alias': true
278             },
279         ],
280     },
281     {
282         // MacroItem
283         'others': [
284             {
285                 'path': 'doc_alias',
286                 'name': 'Macro',
287                 'alias': 'MacroItem',
288                 'href': '../doc_alias/macro.Macro.html',
289                 'is_alias': true
290             },
291         ],
292     },
293 ];