mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
rustdoc-search: removed dead parser code
This is already covered by the normal unexpected char path.
This commit is contained in:
parent
c28de27a73
commit
93f17117ed
@ -473,8 +473,6 @@ function initSearch(rawSearchIndex) {
|
||||
const path = name.trim();
|
||||
if (path.length === 0 && generics.length === 0) {
|
||||
throw ["Unexpected ", parserState.userQuery[parserState.pos]];
|
||||
} else if (path === "*") {
|
||||
throw ["Unexpected ", "*"];
|
||||
}
|
||||
if (query.literalSearch && parserState.totalElems - parserState.genericsElems > 0) {
|
||||
throw ["Cannot have more than one element if you use quotes"];
|
||||
|
@ -17,6 +17,15 @@ const PARSED = [
|
||||
userQuery: "-> <p>",
|
||||
error: "Found generics without a path",
|
||||
},
|
||||
{
|
||||
query: '-> *',
|
||||
elems: [],
|
||||
foundElems: 0,
|
||||
original: "-> *",
|
||||
returned: [],
|
||||
userQuery: "-> *",
|
||||
error: "Unexpected `*`",
|
||||
},
|
||||
{
|
||||
query: 'a<"P">',
|
||||
elems: [],
|
||||
|
Loading…
Reference in New Issue
Block a user