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: Searching for types with generics #86915

Closed
hargoniX opened this issue Jul 6, 2021 · 1 comment
Closed

rustdoc: Searching for types with generics #86915

hargoniX opened this issue Jul 6, 2021 · 1 comment
Labels
A-rustdoc-search Area: Rustdoc's search feature A-type-based-search Area: Searching rustdoc pages using type signatures C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@hargoniX
Copy link
Member

hargoniX commented Jul 6, 2021

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.

@Stupremee Stupremee added A-rustdoc-search Area: Rustdoc's search feature A-type-based-search Area: Searching rustdoc pages using type signatures T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 8, 2021
@GuillaumeGomez GuillaumeGomez added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jul 10, 2021
@notriddle
Copy link
Contributor

Should be closed now what these are merged. The feature is in no way “finished,” but going farther could use more detailed requests:

#112725

#116085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-search Area: Rustdoc's search feature A-type-based-search Area: Searching rustdoc pages using type signatures C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants