Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc-search: search types by higher-order functions #119676

Merged
merged 4 commits into from
Mar 14, 2024

Commits on Mar 12, 2024

  1. 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.
    notriddle committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    7f427f8 View commit details
    Browse the repository at this point in the history
  2. rustdoc: clean up search.js by removing empty sort case

    It's going to be a no-op on the empty list anyway
    (we have plenty of test cases that return nothing)
    so why send extra code?
    notriddle committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    d38527e View commit details
    Browse the repository at this point in the history
  3. rustdoc: use const for the special type name ids

    Initialize them before the search index is loaded.
    notriddle committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    23e931f View commit details
    Browse the repository at this point in the history
  4. 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.
    notriddle committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    7b92655 View commit details
    Browse the repository at this point in the history