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 should support space-separated queries (in additon to ::-separated) #89384

Closed
thomcc opened this issue Sep 30, 2021 · 2 comments
Closed
Labels
A-rustdoc-search Area: Rustdoc's search feature C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@thomcc
Copy link
Member

thomcc commented Sep 30, 2021

I often try to do searches on rustdoc as foo bar rather than foo::bar, since it's easier to type and to me it feels more natural, especially in situations where the path isn't exact (e.g. see example 2 below).

Unfortunately, this pretty much never works, and it would be nice if it did. Concrete examples:

  1. I'd like it if searching vec truncate brought up links to std::vec::Vec::trunctate and such, the way searching vec::truncate does.

  2. I'd like it if arch mm_cvt brought up the list of _mm_cvt functions in core::arch, as searching arch::mm_cvt does

    (Note that in this case, the :: path isn't really actually a thing that appears anywhere in the results, which is part of why I think spaces for this can be more natural)

  3. Ideally when spaces are used, the order wouldn't be important. e.g. mm_cvt x86_64 would work even though mm_cvt::x86_64 doesn't — it would ideally something like this.

    That said, this might be better addressed later, I can't really make heads or tales of most of what the code is doing, so I don't know how big of a deal it is.

I think this is a matter of replacing some of the use of "::" in this file, but I'm not completely sure all the changes that are needed.

@jyn514 jyn514 added A-rustdoc-search Area: Rustdoc's search feature C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 3, 2021
@nerandell
Copy link

@rustbot claim

@Dylan-DPC
Copy link
Member

fixed by #88268

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 C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. 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