Skip to content

rustdoc: Searching for types with generics #86915

Closed
@hargoniX

Description

@hargoniX

Over here rust-lang/rfcs#658 I read that rustdoc is able to search for type signatures which works okay-ish when looking for rather primitive type signatures. However I think it would be cool if one could search for generic types (which is also possible in the "role model" of this feature, hoogle). For example on Result<T> and Option<T> there are lots of conversion functions into other types that aren't searchable at the moment due to their generic nature.

For example on Option<T> there are

  • map function and variants
  • ok function and variants
  • unwrap function and variants

and more that are not searchable at the moment by a type signature but all named very similarly so an inexperienced user could easily end up looking around for the proper variant for quite a bit. If the type signature search would support generics the user could just type out the more precise signature they are looking for and easily find the proper variant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-searchArea: Rustdoc's search featureA-type-based-searchArea: Searching rustdoc pages using type signaturesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.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