rustdoc search: rank identity functions lower unless requested #132285
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.
whenever you perform a
-> SomeType
query, two results almost always show up in the top 5 results:SomeType::clone
, and the reflexiveSomeType::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.
The text was updated successfully, but these errors were encountered: