about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-26 13:58:43 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-26 20:57:46 +0200
commit4ea149905b460e086809d7a34dfcbdca312bee3d (patch)
treeec53ebc576e39d6e1f12797300a4eda3f61af08d /src/test/rustdoc-js-std/parser-errors.js
parent45cdb2be10756f584540f349a379730c43fe0976 (diff)
downloadrust-4ea149905b460e086809d7a34dfcbdca312bee3d.tar.gz
rust-4ea149905b460e086809d7a34dfcbdca312bee3d.zip
Update rustdoc search test to check `!`
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
-rw-r--r--src/test/rustdoc-js-std/parser-errors.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js
index 779ab867c12..dc42031e05f 100644
--- a/src/test/rustdoc-js-std/parser-errors.js
+++ b/src/test/rustdoc-js-std/parser-errors.js
@@ -35,6 +35,8 @@ const QUERY = [
     "a,:",
     "  a<>  :",
     "mod : :",
+    "a!a",
+    "a!!",
 ];
 
 const PARSED = [
@@ -362,4 +364,22 @@ const PARSED = [
         userQuery: "mod : :",
         error: 'Unexpected `:`',
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a!a",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a!a",
+        error: '`!` can only be at the end of an ident',
+    },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a!!",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a!!",
+        error: 'Cannot have more than one `!` in an ident',
+    },
 ];