Commit graph

2 commits

Author SHA1 Message Date
Michael Howell 7b926555b7 rustdoc-search: add search query syntax Fn(T) -> U
This is implemented, in addition to the ML-style one,
because Rust does it. If we don't, we'll never hear the end of it.

This commit also refactors some duplicate parts of the parser
into a dedicated function.
2024-03-11 22:27:22 -07:00
Michael Howell 7f427f86bd 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.
2024-03-11 21:22:03 -07:00