-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Rustdoc search should support space-separated queries (in additon to ::-separated) #89384
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-rustdoc-searchArea: Rustdoc's search featureArea: Rustdoc's search featureC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-rustdoc-searchArea: Rustdoc's search featureArea: Rustdoc's search featureC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I often try to do searches on rustdoc as
foo barrather thanfoo::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:
I'd like it if searching
vec truncatebrought up links to std::vec::Vec::trunctate and such, the way searchingvec::truncatedoes.I'd like it if
arch mm_cvtbrought up the list of_mm_cvtfunctions in core::arch, as searchingarch::mm_cvtdoes(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)Ideally when spaces are used, the order wouldn't be important. e.g.
mm_cvt x86_64would work even thoughmm_cvt::x86_64doesn'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.