Files
rust/src/test/rustdoc-js/doc-alias.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

296 lines
7.4 KiB
JavaScript
Raw Normal View History

2020-05-01 00:27:24 +02:00
// exact-check
const QUERY = [
'StructItem',
'StructFieldItem',
'StructMethodItem',
'ImplTraitItem',
'StructImplConstItem',
2020-05-01 00:27:24 +02:00
'ImplTraitFunction',
'EnumItem',
'VariantItem',
'EnumMethodItem',
'TypedefItem',
'TraitItem',
'TraitTypeItem',
'AssociatedConstItem',
'TraitFunctionItem',
'FunctionItem',
'ModuleItem',
'ConstItem',
'StaticItem',
'UnionItem',
'UnionFieldItem',
'UnionMethodItem',
'MacroItem',
];
const EXPECTED = [
{
2021-08-11 20:14:26 +02:00
// StructItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Struct',
2021-08-11 20:14:26 +02:00
'alias': 'structitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/struct.Struct.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// StructFieldItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Struct',
'name': 'field',
2021-08-11 20:14:26 +02:00
'alias': 'structfielditem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/struct.Struct.html#structfield.field',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// StructMethodItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Struct',
'name': 'method',
2021-08-11 20:14:26 +02:00
'alias': 'structmethoditem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/struct.Struct.html#method.method',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
// ImplTraitItem
'others': [],
},
{
// StructImplConstItem
'others': [
{
'path': 'doc_alias::Struct',
'name': 'ImplConstItem',
2021-08-11 20:14:26 +02:00
'alias': 'structimplconstitem',
'href': '../doc_alias/struct.Struct.html#associatedconstant.ImplConstItem',
'is_alias': true
},
],
2020-05-01 00:27:24 +02:00
},
{
2021-08-11 20:14:26 +02:00
// ImplTraitFunction
2020-05-07 21:42:41 +02:00
'others': [
{
'path': 'doc_alias::Struct',
'name': 'function',
2021-08-11 20:14:26 +02:00
'alias': 'impltraitfunction',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/struct.Struct.html#method.function',
'is_alias': true
},
],
2020-05-01 00:27:24 +02:00
},
{
2021-08-11 20:14:26 +02:00
// EnumItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Enum',
2021-08-11 20:14:26 +02:00
'alias': 'enumitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/enum.Enum.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// VariantItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Enum',
'name': 'Variant',
2021-08-11 20:14:26 +02:00
'alias': 'variantitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/enum.Enum.html#variant.Variant',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// EnumMethodItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Enum',
'name': 'method',
2021-08-11 20:14:26 +02:00
'alias': 'enummethoditem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/enum.Enum.html#method.method',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// TypedefItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Typedef',
2021-08-11 20:14:26 +02:00
'alias': 'typedefitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/type.Typedef.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// TraitItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Trait',
2021-08-11 20:14:26 +02:00
'alias': 'traititem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/trait.Trait.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// TraitTypeItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Trait',
'name': 'Target',
2021-08-11 20:14:26 +02:00
'alias': 'traittypeitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/trait.Trait.html#associatedtype.Target',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// AssociatedConstItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Trait',
'name': 'AssociatedConst',
2021-08-11 20:14:26 +02:00
'alias': 'associatedconstitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/trait.Trait.html#associatedconstant.AssociatedConst',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// TraitFunctionItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Trait',
'name': 'function',
2021-08-11 20:14:26 +02:00
'alias': 'traitfunctionitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/trait.Trait.html#tymethod.function',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// FunctionItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'function',
2021-08-11 20:14:26 +02:00
'alias': 'functionitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/fn.function.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// ModuleItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Module',
2021-08-11 20:14:26 +02:00
'alias': 'moduleitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/Module/index.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// ConstItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Const',
2021-08-11 20:14:26 +02:00
'alias': 'constitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/constant.Const.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
{
'path': 'doc_alias::Struct',
'name': 'ImplConstItem',
},
2020-05-01 00:27:24 +02:00
],
},
{
2021-08-11 20:14:26 +02:00
// StaticItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Static',
2021-08-11 20:14:26 +02:00
'alias': 'staticitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/static.Static.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// UnionItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Union',
2021-08-11 20:14:26 +02:00
'alias': 'unionitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/union.Union.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
// Not an alias!
{
'path': 'doc_alias::Union',
'name': 'union_item',
'href': '../doc_alias/union.Union.html#structfield.union_item'
},
],
},
{
2021-08-11 20:14:26 +02:00
// UnionFieldItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Union',
'name': 'union_item',
2021-08-11 20:14:26 +02:00
'alias': 'unionfielditem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/union.Union.html#structfield.union_item',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// UnionMethodItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias::Union',
'name': 'method',
2021-08-11 20:14:26 +02:00
'alias': 'unionmethoditem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/union.Union.html#method.method',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
{
2021-08-11 20:14:26 +02:00
// MacroItem
2020-05-01 00:27:24 +02:00
'others': [
{
'path': 'doc_alias',
'name': 'Macro',
2021-08-11 20:14:26 +02:00
'alias': 'macroitem',
2020-05-07 21:42:41 +02:00
'href': '../doc_alias/macro.Macro.html',
'is_alias': true
2020-05-01 00:27:24 +02:00
},
],
},
];