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: for return-type based searches, deprioritize functions that also have that type in an argument #134935

Closed
lolbinarycat opened this issue Dec 30, 2024 · 2 comments · Fixed by #135302
Labels
A-rustdoc-search Area: Rustdoc's search feature A-type-based-search Area: Searching rustdoc pages using type signatures C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@lolbinarycat
Copy link
Contributor

lolbinarycat commented Dec 30, 2024

for example, searching the rustc docs for -> Context returns several clone methods.

what this type of search means is "how do i get values of this type", in which case clone is not very useful, and stuff like constructors should be shown first.

this would apply to both -> Type searches and also the "in return types" tab.

@lolbinarycat lolbinarycat added the A-rustdoc-search Area: Rustdoc's search feature label Dec 30, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 30, 2024
@lolbinarycat lolbinarycat added A-type-based-search Area: Searching rustdoc pages using type signatures T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Dec 30, 2024
@jieyouxu jieyouxu added C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 31, 2024
@lolbinarycat
Copy link
Contributor Author

this is the case for any type implementing Clone whose cannonical constructor has many arguments

@lolbinarycat
Copy link
Contributor Author

it is also frequently the case for error types without a constructor, such as AllocError.

jhpratt added a commit to jhpratt/rust that referenced this issue Jan 11, 2025
…resurected, r=onur-ozkan

re-add a warning for old master branch, but with much simpler logic

instead of calling into git or checking the modification time of files, simply print the warning if there is a very large number of "modified" files.

also make the wording much softer, so false positives are less alarming.

(warning was removed in rust-lang#134935)
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 11, 2025
Rollup merge of rust-lang#135301 - lolbinarycat:bootstrap-old-master-resurected, r=onur-ozkan

re-add a warning for old master branch, but with much simpler logic

instead of calling into git or checking the modification time of files, simply print the warning if there is a very large number of "modified" files.

also make the wording much softer, so false positives are less alarming.

(warning was removed in rust-lang#134935)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 14, 2025
…-sort-134935, r=notriddle

for purely return-type based searches, deprioritize clone-like functions

closes rust-lang#134935
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jan 14, 2025
…-sort-134935, r=notriddle

for purely return-type based searches, deprioritize clone-like functions

closes rust-lang#134935
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Jan 15, 2025
…-sort-134935, r=notriddle

for purely return-type based searches, deprioritize clone-like functions

closes rust-lang#134935
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 15, 2025
Rollup merge of rust-lang#135302 - lolbinarycat:rustdoc-search-return-sort-134935, r=notriddle

for purely return-type based searches, deprioritize clone-like functions

closes rust-lang#134935
@lolbinarycat lolbinarycat marked this as a duplicate of #132285 Jan 20, 2025
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-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants