summaryrefslogtreecommitdiff
path: root/tests/rustdoc-js-std/parser-errors.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-errors.js
parentc5d1b3ea9665e77e3af2f17b311bf65469eedc19 (diff)
downloadrust-4de9c6d4913a02b5ce19a14e9e2ab0c46ceea771.tar.gz
rustdoc: search by macro when query ends with `!`
Related to #96399
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
-rw-r--r--tests/rustdoc-js-std/parser-errors.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index dc42031e05f..f82a2472063 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -37,6 +37,8 @@ const QUERY = [
"mod : :",
"a!a",
"a!!",
+ "mod:a!",
+ "a!::a",
];
const PARSED = [
@@ -382,4 +384,22 @@ const PARSED = [
userQuery: "a!!",
error: 'Cannot have more than one `!` in an ident',
},
+ {
+ elems: [],
+ foundElems: 0,
+ original: "mod:a!",
+ returned: [],
+ typeFilter: -1,
+ userQuery: "mod:a!",
+ error: 'Invalid search type: macro `!` and `mod` both specified',
+ },
+ {
+ elems: [],
+ foundElems: 0,
+ original: "a!::a",
+ returned: [],
+ typeFilter: -1,
+ userQuery: "a!::a",
+ error: 'Cannot have associated items in macros',
+ },
];