Skip to content

rustdoc search: allow combining a type based search with a name based search #131130

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

Open
lolbinarycat opened this issue Oct 2, 2024 · 0 comments · May be fixed by #131852
Open

rustdoc search: allow combining a type based search with a name based search #131130

lolbinarycat opened this issue Oct 2, 2024 · 0 comments · May be fixed by #131852
Assignees
Labels
A-rustdoc-search Area: Rustdoc's search feature 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.

Comments

@lolbinarycat
Copy link
Contributor

usecase: i know reqwest has a method on Response that turns error status codes into Result. i know it probably has "error" in the name. it would be nice to be able to do something like "error" Response -> Result to search for this.

in this case, just Response -> Result works well enough, but that seems to be a coincidince due to async functions being ranked below sync functions.

@lolbinarycat lolbinarycat added A-rustdoc-search Area: Rustdoc's search feature T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Oct 2, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 2, 2024
@lolbinarycat lolbinarycat self-assigned this Oct 16, 2024
@lolbinarycat lolbinarycat added the A-type-based-search Area: Searching rustdoc pages using type signatures label Oct 16, 2024
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Oct 17, 2024
repurposes existing syntax that previously had a nonsese meaning.

now `fn:add, u8 -> u8` searches for fn items with "add" in the name,
that take a `u8` argument and return a `u8`.

the kind is included in anticipation that type based searches will
soon work on items other than functions and methods.

fixes rust-lang#131130
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Oct 19, 2024
repurposes existing syntax that previously had a nonsese meaning.

now `fn:add, u8 -> u8` searches for fn items with "add" in the name,
that take a `u8` argument and return a `u8`.

the kind is included in anticipation that type based searches will
soon work on items other than functions and methods.

fixes rust-lang#131130
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Oct 19, 2024
repurposes existing syntax that previously had a nonsese meaning.

now `fn:add, u8 -> u8` searches for fn items with "add" in the name,
that take a `u8` argument and return a `u8`.

the kind is included in anticipation that type based searches will
soon work on items other than functions and methods.

fixes rust-lang#131130
@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 9, 2024
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Nov 11, 2024
repurposes existing syntax that previously had a nonsese meaning.

now `fn:add, u8 -> u8` searches for fn items with "add" in the name,
that take a `u8` argument and return a `u8`.

the kind is included in anticipation that type based searches will
soon work on items other than functions and methods.

fixes rust-lang#131130
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 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