Skip to content

rustdoc type-based search appears to not support searching by built-in types #60485

Open
@nagisa

Description

You can search for functions that appear to satisfy some sort of a shape/type as such input -> output, however that will not work for more complicated searches involving built-in types, including:

  • slices [T] -> *;
  • pointers *mut T -> *;
  • tuples (*, *);
    • and similarly multiple arguments
  • probably more.

Instead of attempting to guess a what kind of search this is based on -> I propose that we add another "type" indicating that this is a signature we’re looking for and take a type of the function pointer as an argument, so something like this would work:

  • sig:fn([T]) -> *
  • sig:fn(*mut T) -> T
  • `sig:(A, B)
  • sig:...

Metadata

Assignees

No one assigned

    Labels

    A-type-based-searchArea: Searching rustdoc pages using type signaturesC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions