diff options
| author | Michael Howell <michael@notriddle.com> | 2023-02-28 18:17:59 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-03-20 22:41:57 -0700 |
| commit | e600c0ba0e0b8153e68c4cead3d92b2c52ca8914 (patch) | |
| tree | 2edcba6db60fd0dd0580249843ae57fc37c67de9 /src/tools/rustdoc-js/tester.js | |
| parent | 3ff4d56650bf5f7a57d11f3666fb429f0b00b18f (diff) | |
| download | rust-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 'src/tools/rustdoc-js/tester.js')
| -rw-r--r-- | src/tools/rustdoc-js/tester.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js index 8d46a8ce7f1..6b9a9b66a7d 100644 --- a/src/tools/rustdoc-js/tester.js +++ b/src/tools/rustdoc-js/tester.js @@ -79,11 +79,18 @@ function checkNeededFields(fullPath, expected, error_text, queryName, position) "foundElems", "original", "returned", - "typeFilter", "userQuery", "error", ]; - } else if (fullPath.endsWith("elems") || fullPath.endsWith("generics")) { + } else if (fullPath.endsWith("elems") || fullPath.endsWith("returned")) { + fieldsToCheck = [ + "name", + "fullPath", + "pathWithoutLast", + "pathLast", + "generics", + ]; + } else if (fullPath.endsWith("generics")) { fieldsToCheck = [ "name", "fullPath", |
