rustdoc: add support for type filters in arguments and generics
This makes sense, since the search index has the information in it, and it's more useful for function signature searches since a function signature search's item type is, by definition, some type of function (there's more than one, but not very many).
This commit is contained in:
parent
3ff4d56650
commit
e600c0ba0e
15 changed files with 301 additions and 150 deletions
|
@ -19,8 +19,8 @@ const PARSED = [
|
|||
pathWithoutLast: [],
|
||||
pathLast: "p",
|
||||
generics: [],
|
||||
typeFilter: -1,
|
||||
}],
|
||||
typeFilter: -1,
|
||||
userQuery: '-> "p"',
|
||||
error: null,
|
||||
},
|
||||
|
@ -31,11 +31,11 @@ const PARSED = [
|
|||
pathWithoutLast: [],
|
||||
pathLast: "p",
|
||||
generics: [],
|
||||
typeFilter: -1,
|
||||
}],
|
||||
foundElems: 1,
|
||||
original: '"p",',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: '"p",',
|
||||
error: null,
|
||||
},
|
||||
|
@ -44,7 +44,6 @@ const PARSED = [
|
|||
foundElems: 0,
|
||||
original: '"p" -> a',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: '"p" -> a',
|
||||
error: "You cannot have more than one element if you use quotes",
|
||||
},
|
||||
|
@ -53,7 +52,6 @@ const PARSED = [
|
|||
foundElems: 0,
|
||||
original: '"a" -> "p"',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: '"a" -> "p"',
|
||||
error: "Cannot have more than one literal search element",
|
||||
},
|
||||
|
@ -62,7 +60,6 @@ const PARSED = [
|
|||
foundElems: 0,
|
||||
original: '->"-"',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: '->"-"',
|
||||
error: 'Unexpected `-` in a string element',
|
||||
},
|
||||
|
@ -71,7 +68,6 @@ const PARSED = [
|
|||
foundElems: 0,
|
||||
original: '"a',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: '"a',
|
||||
error: 'Unclosed `"`',
|
||||
},
|
||||
|
@ -80,7 +76,6 @@ const PARSED = [
|
|||
foundElems: 0,
|
||||
original: '""',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
userQuery: '""',
|
||||
error: 'Cannot have empty string element',
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue