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-03-28 15:08:47 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-18 20:59:09 +0200
commit1f5c4c2b306689347d12627bae9895624ee8eae1 (patch)
tree1fc36a9fd648f543cab59aaadcebaa3ceb85a983 /src/test/rustdoc-js-std/parser-errors.js
parent8e29ed43d9943b2cf705e3511e54ba01d2feaa93 (diff)
downloadrust-1f5c4c2b306689347d12627bae9895624ee8eae1.tar.gz
rust-1f5c4c2b306689347d12627bae9895624ee8eae1.zip
Forbid rustdoc search query to end with ->
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
-rw-r--r--src/test/rustdoc-js-std/parser-errors.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/rustdoc-js-std/parser-errors.js b/src/test/rustdoc-js-std/parser-errors.js
index ae5145e8322..42d69ed3fe0 100644
--- a/src/test/rustdoc-js-std/parser-errors.js
+++ b/src/test/rustdoc-js-std/parser-errors.js
@@ -21,6 +21,7 @@ const QUERY = [
     "a-bb",
     "a>bb",
     "ab'",
+    "a->",
 ];
 
 const PARSED = [
@@ -222,4 +223,13 @@ const PARSED = [
         userQuery: "ab'",
         error: "Unexpected `'`",
     },
+    {
+        elems: [],
+        foundElems: 0,
+        original: "a->",
+        returned: [],
+        typeFilter: -1,
+        userQuery: "a->",
+        error: "Expected at least one item after `->`",
+    },
 ];