about summary refs log tree commit diff
path: root/src/test/rustdoc-js/doc-alias.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-05-07 21:42:41 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-05-14 11:36:02 +0200
commitc4d9318be6a493da4c6aa307dd4de7e24a15120a (patch)
tree95704b40751231b26bbd57d5376ba3a3a05d120a /src/test/rustdoc-js/doc-alias.js
parent883c177abb216fcef5b2d2369970394b0967f302 (diff)
downloadrust-c4d9318be6a493da4c6aa307dd4de7e24a15120a.tar.gz
rust-c4d9318be6a493da4c6aa307dd4de7e24a15120a.zip
Make current crate aliases go first
Diffstat (limited to 'src/test/rustdoc-js/doc-alias.js')
-rw-r--r--src/test/rustdoc-js/doc-alias.js68
1 files changed, 47 insertions, 21 deletions
diff --git a/src/test/rustdoc-js/doc-alias.js b/src/test/rustdoc-js/doc-alias.js
index e6310b625e5..896808d4157 100644
--- a/src/test/rustdoc-js/doc-alias.js
+++ b/src/test/rustdoc-js/doc-alias.js
@@ -32,7 +32,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Struct',
                 'alias': 'StructItem',
-                'href': '../doc_alias/struct.Struct.html'
+                'href': '../doc_alias/struct.Struct.html',
+                'is_alias': true
             },
         ],
     },
@@ -42,7 +43,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Struct',
                 'name': 'field',
                 'alias': 'StructFieldItem',
-                'href': '../doc_alias/struct.Struct.html#structfield.field'
+                'href': '../doc_alias/struct.Struct.html#structfield.field',
+                'is_alias': true
             },
         ],
     },
@@ -52,7 +54,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Struct',
                 'name': 'method',
                 'alias': 'StructMethodItem',
-                'href': '../doc_alias/struct.Struct.html#method.method'
+                'href': '../doc_alias/struct.Struct.html#method.method',
+                'is_alias': true
             },
         ],
     },
@@ -65,8 +68,15 @@ const EXPECTED = [
         'others': [],
     },
     {
-        // ImplTraitFunction
-        'others': [],
+        'others': [
+            {
+                'path': 'doc_alias::Struct',
+                'name': 'function',
+                'alias': 'ImplTraitFunction',
+                'href': '../doc_alias/struct.Struct.html#method.function',
+                'is_alias': true
+            },
+        ],
     },
     {
         'others': [
@@ -74,7 +84,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Enum',
                 'alias': 'EnumItem',
-                'href': '../doc_alias/enum.Enum.html'
+                'href': '../doc_alias/enum.Enum.html',
+                'is_alias': true
             },
         ],
     },
@@ -84,7 +95,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Enum',
                 'name': 'Variant',
                 'alias': 'VariantItem',
-                'href': '../doc_alias/enum.Enum.html#variant.Variant'
+                'href': '../doc_alias/enum.Enum.html#variant.Variant',
+                'is_alias': true
             },
         ],
     },
@@ -94,7 +106,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Enum',
                 'name': 'method',
                 'alias': 'EnumMethodItem',
-                'href': '../doc_alias/enum.Enum.html#method.method'
+                'href': '../doc_alias/enum.Enum.html#method.method',
+                'is_alias': true
             },
         ],
     },
@@ -104,7 +117,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Typedef',
                 'alias': 'TypedefItem',
-                'href': '../doc_alias/type.Typedef.html'
+                'href': '../doc_alias/type.Typedef.html',
+                'is_alias': true
             },
         ],
     },
@@ -114,7 +128,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Trait',
                 'alias': 'TraitItem',
-                'href': '../doc_alias/trait.Trait.html'
+                'href': '../doc_alias/trait.Trait.html',
+                'is_alias': true
             },
         ],
     },
@@ -124,7 +139,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Trait',
                 'name': 'Target',
                 'alias': 'TraitTypeItem',
-                'href': '../doc_alias/trait.Trait.html#associatedtype.Target'
+                'href': '../doc_alias/trait.Trait.html#associatedtype.Target',
+                'is_alias': true
             },
         ],
     },
@@ -134,7 +150,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Trait',
                 'name': 'AssociatedConst',
                 'alias': 'AssociatedConstItem',
-                'href': '../doc_alias/trait.Trait.html#associatedconstant.AssociatedConst'
+                'href': '../doc_alias/trait.Trait.html#associatedconstant.AssociatedConst',
+                'is_alias': true
             },
         ],
     },
@@ -144,7 +161,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Trait',
                 'name': 'function',
                 'alias': 'TraitFunctionItem',
-                'href': '../doc_alias/trait.Trait.html#tymethod.function'
+                'href': '../doc_alias/trait.Trait.html#tymethod.function',
+                'is_alias': true
             },
         ],
     },
@@ -154,7 +172,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'function',
                 'alias': 'FunctionItem',
-                'href': '../doc_alias/fn.function.html'
+                'href': '../doc_alias/fn.function.html',
+                'is_alias': true
             },
         ],
     },
@@ -164,7 +183,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Module',
                 'alias': 'ModuleItem',
-                'href': '../doc_alias/Module/index.html'
+                'href': '../doc_alias/Module/index.html',
+                'is_alias': true
             },
         ],
     },
@@ -174,7 +194,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Const',
                 'alias': 'ConstItem',
-                'href': '../doc_alias/constant.Const.html'
+                'href': '../doc_alias/constant.Const.html',
+                'is_alias': true
             },
         ],
     },
@@ -184,7 +205,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Static',
                 'alias': 'StaticItem',
-                'href': '../doc_alias/static.Static.html'
+                'href': '../doc_alias/static.Static.html',
+                'is_alias': true
             },
         ],
     },
@@ -194,7 +216,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Union',
                 'alias': 'UnionItem',
-                'href': '../doc_alias/union.Union.html'
+                'href': '../doc_alias/union.Union.html',
+                'is_alias': true
             },
             // Not an alias!
             {
@@ -210,7 +233,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Union',
                 'name': 'union_item',
                 'alias': 'UnionFieldItem',
-                'href': '../doc_alias/union.Union.html#structfield.union_item'
+                'href': '../doc_alias/union.Union.html#structfield.union_item',
+                'is_alias': true
             },
         ],
     },
@@ -220,7 +244,8 @@ const EXPECTED = [
                 'path': 'doc_alias::Union',
                 'name': 'method',
                 'alias': 'UnionMethodItem',
-                'href': '../doc_alias/union.Union.html#method.method'
+                'href': '../doc_alias/union.Union.html#method.method',
+                'is_alias': true
             },
         ],
     },
@@ -230,7 +255,8 @@ const EXPECTED = [
                 'path': 'doc_alias',
                 'name': 'Macro',
                 'alias': 'MacroItem',
-                'href': '../doc_alias/macro.Macro.html'
+                'href': '../doc_alias/macro.Macro.html',
+                'is_alias': true
             },
         ],
     },