summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /tests/rustdoc-js-std/parser-errors.js
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
-rw-r--r--tests/rustdoc-js-std/parser-errors.js34
1 files changed, 32 insertions, 2 deletions
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js
index dc42031e0..98c6f27ca 100644
--- a/tests/rustdoc-js-std/parser-errors.js
+++ b/tests/rustdoc-js-std/parser-errors.js
@@ -37,6 +37,9 @@ const QUERY = [
"mod : :",
"a!a",
"a!!",
+ "mod:a!",
+ "a!::a",
+ "a<",
];
const PARSED = [
@@ -65,7 +68,7 @@ const PARSED = [
returned: [],
typeFilter: -1,
userQuery: "a<\"p\">",
- error: "`\"` cannot be used in generics",
+ error: "Unexpected `\"` in generics",
},
{
elems: [],
@@ -371,7 +374,7 @@ const PARSED = [
returned: [],
typeFilter: -1,
userQuery: "a!a",
- error: '`!` can only be at the end of an ident',
+ error: 'Unexpected `!`: it can only be at the end of an ident',
},
{
elems: [],
@@ -382,4 +385,31 @@ 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',
+ },
+ {
+ elems: [],
+ foundElems: 0,
+ original: "a<",
+ returned: [],
+ typeFilter: -1,
+ userQuery: "a<",
+ error: "Unclosed `<`",
+ },
];