rustdoc-search: parse and search with ML-style HOF
Option::map, for example, looks like this:
option<t>, (t -> u) -> option<u>
This syntax searches all of the HOFs in Rust: traits Fn, FnOnce,
and FnMut, and bare fn primitives.
This commit is contained in:
@@ -114,7 +114,7 @@ const PARSED = [
|
||||
original: "(p -> p",
|
||||
returned: [],
|
||||
userQuery: "(p -> p",
|
||||
error: "Unexpected `-` after `(`",
|
||||
error: "Unclosed `(`",
|
||||
},
|
||||
{
|
||||
query: "::a::b",
|
||||
@@ -330,7 +330,7 @@ const PARSED = [
|
||||
original: 'a<->',
|
||||
returned: [],
|
||||
userQuery: 'a<->',
|
||||
error: 'Unexpected `-` after `<`',
|
||||
error: 'Unclosed `<`',
|
||||
},
|
||||
{
|
||||
query: "a<a>:",
|
||||
|
||||
Reference in New Issue
Block a user