about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-weird-queries.js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-02-28 18:17:59 -0700
committerMichael Howell <michael@notriddle.com>2023-03-20 22:41:57 -0700
commite600c0ba0e0b8153e68c4cead3d92b2c52ca8914 (patch)
tree2edcba6db60fd0dd0580249843ae57fc37c67de9 /tests/rustdoc-js-std/parser-weird-queries.js
parent3ff4d56650bf5f7a57d11f3666fb429f0b00b18f (diff)
downloadrust-e600c0ba0e0b8153e68c4cead3d92b2c52ca8914.tar.gz
rust-e600c0ba0e0b8153e68c4cead3d92b2c52ca8914.zip
rustdoc: add support for type filters in arguments and generics
This makes sense, since the search index has the information in it,
and it's more useful for function signature searches since a
function signature search's item type is, by definition, some type
of function (there's more than one, but not very many).
Diffstat (limited to 'tests/rustdoc-js-std/parser-weird-queries.js')
-rw-r--r--tests/rustdoc-js-std/parser-weird-queries.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/rustdoc-js-std/parser-weird-queries.js b/tests/rustdoc-js-std/parser-weird-queries.js
index a3d85aeca5e..dc1049a70bc 100644
--- a/tests/rustdoc-js-std/parser-weird-queries.js
+++ b/tests/rustdoc-js-std/parser-weird-queries.js
@@ -20,6 +20,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "a",
                 generics: [],
+                typeFilter: -1,
             },
             {
                 name: "b",
@@ -27,12 +28,12 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "b",
                 generics: [],
+                typeFilter: -1,
             },
         ],
         foundElems: 2,
         original: "a b",
         returned: [],
-        typeFilter: -1,
         userQuery: "a b",
         error: null,
     },
@@ -44,6 +45,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "a",
                 generics: [],
+                typeFilter: -1,
             },
             {
                 name: "b",
@@ -51,12 +53,12 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "b",
                 generics: [],
+                typeFilter: -1,
             },
         ],
         foundElems: 2,
         original: "a   b",
         returned: [],
-        typeFilter: -1,
         userQuery: "a   b",
         error: null,
     },
@@ -65,7 +67,6 @@ const PARSED = [
         foundElems: 0,
         original: "a,b(c)",
         returned: [],
-        typeFilter: -1,
         userQuery: "a,b(c)",
         error: "Unexpected `(`",
     },
@@ -77,6 +78,7 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "aaa",
                 generics: [],
+                typeFilter: -1,
             },
             {
                 name: "a",
@@ -84,12 +86,12 @@ const PARSED = [
                 pathWithoutLast: [],
                 pathLast: "a",
                 generics: [],
+                typeFilter: -1,
             },
         ],
         foundElems: 2,
         original: "aaa,a",
         returned: [],
-        typeFilter: -1,
         userQuery: "aaa,a",
         error: null,
     },
@@ -98,7 +100,6 @@ const PARSED = [
         foundElems: 0,
         original: ",,,,",
         returned: [],
-        typeFilter: -1,
         userQuery: ",,,,",
         error: null,
     },
@@ -107,17 +108,15 @@ const PARSED = [
         foundElems: 0,
         original: 'mod    :',
         returned: [],
-        typeFilter: 0,
         userQuery: 'mod    :',
-        error: null,
+        error: "Unexpected `:` (expected path after type filter)",
     },
     {
         elems: [],
         foundElems: 0,
         original: 'mod\t:',
         returned: [],
-        typeFilter: 0,
         userQuery: 'mod\t:',
-        error: null,
+        error: "Unexpected `:` (expected path after type filter)",
     },
 ];