Skip to content

Commit 93f1711

Browse files
committed
rustdoc-search: removed dead parser code
This is already covered by the normal unexpected char path.
1 parent c28de27 commit 93f1711

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/librustdoc/html/static/js/search.js

-2
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,6 @@ function initSearch(rawSearchIndex) {
473473
const path = name.trim();
474474
if (path.length === 0 && generics.length === 0) {
475475
throw ["Unexpected ", parserState.userQuery[parserState.pos]];
476-
} else if (path === "*") {
477-
throw ["Unexpected ", "*"];
478476
}
479477
if (query.literalSearch && parserState.totalElems - parserState.genericsElems > 0) {
480478
throw ["Cannot have more than one element if you use quotes"];

tests/rustdoc-js-std/parser-errors.js

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ const PARSED = [
1717
userQuery: "-> <p>",
1818
error: "Found generics without a path",
1919
},
20+
{
21+
query: '-> *',
22+
elems: [],
23+
foundElems: 0,
24+
original: "-> *",
25+
returned: [],
26+
userQuery: "-> *",
27+
error: "Unexpected `*`",
28+
},
2029
{
2130
query: 'a<"P">',
2231
elems: [],

0 commit comments

Comments
 (0)