Closed as duplicate of#134935
Description
whenever you perform a -> SomeType
query, two results almost always show up in the top 5 results: SomeType::clone
, and the reflexive SomeType::from
.
when people perform this type of search, they are almost always doing it because they need a value of that type, and don't already have one.
I think that when there are no input arguments in a type-based search, we should rank items that take their return type as an argument below those that don't. if repeatedly checking the arguments of functions during sort has significant performance impact, we can amortize it by caching this property in the search index.
Metadata
Metadata
Assignees
Labels
Area: Rustdoc's search featureArea: Searching rustdoc pages using type signaturesCategory: An issue proposing an enhancement or a PR with one.Relevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.