about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-ident.js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-02-16 15:32:38 -0700
committerMichael Howell <michael@notriddle.com>2023-02-16 18:16:09 -0700
commit4de9c6d4913a02b5ce19a14e9e2ab0c46ceea771 (patch)
tree4a8d56f30ffd5c60f68262fddb975dbef95ca382 /tests/rustdoc-js-std/parser-ident.js
parentc5d1b3ea9665e77e3af2f17b311bf65469eedc19 (diff)
downloadrust-4de9c6d4913a02b5ce19a14e9e2ab0c46ceea771.tar.gz
rust-4de9c6d4913a02b5ce19a14e9e2ab0c46ceea771.zip
rustdoc: search by macro when query ends with `!`
Related to #96399
Diffstat (limited to 'tests/rustdoc-js-std/parser-ident.js')
-rw-r--r--tests/rustdoc-js-std/parser-ident.js40
1 files changed, 22 insertions, 18 deletions
diff --git a/tests/rustdoc-js-std/parser-ident.js b/tests/rustdoc-js-std/parser-ident.js
index 4b5ab01ac76..6c17d00f16e 100644
--- a/tests/rustdoc-js-std/parser-ident.js
+++ b/tests/rustdoc-js-std/parser-ident.js
@@ -3,6 +3,7 @@ const QUERY = [
     "!",
     "a!",
     "a!::b",
+    "!::b",
     "a!::b!",
 ];
 
@@ -47,47 +48,50 @@ const PARSED = [
     },
     {
         elems: [{
-            name: "a!",
-            fullPath: ["a!"],
+            name: "a",
+            fullPath: ["a"],
             pathWithoutLast: [],
-            pathLast: "a!",
+            pathLast: "a",
             generics: [],
         }],
         foundElems: 1,
         original: "a!",
         returned: [],
-        typeFilter: -1,
+        typeFilter: 14,
         userQuery: "a!",
         error: null,
     },
     {
-        elems: [{
-            name: "a!::b",
-            fullPath: ["a!", "b"],
-            pathWithoutLast: ["a!"],
-            pathLast: "b",
-            generics: [],
-        }],
-        foundElems: 1,
+        elems: [],
+        foundElems: 0,
         original: "a!::b",
         returned: [],
         typeFilter: -1,
         userQuery: "a!::b",
-        error: null,
+        error: "Cannot have associated items in macros",
     },
     {
         elems: [{
-            name: "a!::b!",
-            fullPath: ["a!", "b!"],
-            pathWithoutLast: ["a!"],
-            pathLast: "b!",
+            name: "!::b",
+            fullPath: ["!", "b"],
+            pathWithoutLast: ["!"],
+            pathLast: "b",
             generics: [],
         }],
         foundElems: 1,
+        original: "!::b",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "!::b",
+        error: null,
+    },
+    {
+        elems: [],
+        foundElems: 0,
         original: "a!::b!",
         returned: [],
         typeFilter: -1,
         userQuery: "a!::b!",
-        error: null,
+        error: "Cannot have associated items in macros",
     },
 ];