You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rustdoc reduce search rank for deprecated items #98759
I'd like to move forward on this. Hopefully we can get an FCP started. The prime motivation for this is to improve search results when searching for numeric constants like i32::MIN.
Problem
Currently, when searching for i32::MIN, the deprecated item std::i32::MIN shows up before i32::MIN in the search results, and there is no indication that std::i32::MIN is deprecated until you go to the page for std::i32::MIN:
And it's even worse if you search for just MIN, where all of the deprecated std::<num>::MIN items come up above the constants on the number types:
Resolution
sort deprecated items lower in the search results
mark deprecated items as deprecated in search results
i32::MAX shows up above std::i32::MAX and core::i32::MAX
If just searching for min, the deprecated results show up far below other things:
one page later
And, as you can see, the "Deprecation planned" message shows up in the search results. The same is true for fully-deprecated items like mem::uninitialized:
Activity
rustbot commentedon Jul 1, 2022
Error: Label C can only be set by Rust team members
Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.
pitaj commentedon Feb 3, 2023
@rustbot claim
pitaj commentedon Feb 3, 2023
I'd like to move forward on this. Hopefully we can get an FCP started. The prime motivation for this is to improve search results when searching for numeric constants like
i32::MIN.Problem
Currently, when searching for

i32::MIN, the deprecated itemstd::i32::MINshows up beforei32::MINin the search results, and there is no indication thatstd::i32::MINis deprecated until you go to the page forstd::i32::MIN:And it's even worse if you search for just

MIN, where all of the deprecatedstd::<num>::MINitems come up above the constants on the number types:Resolution
i32::MAXshows up abovestd::i32::MAXandcore::i32::MAXIf just searching for
min, the deprecated results show up far below other things:one page later
And, as you can see, the "Deprecation planned" message shows up in the search results. The same is true for fully-deprecated items like

mem::uninitialized:For good measure, the radix search from the OP:

pitaj commentedon Feb 3, 2023
Another example from #107629 (comment):
Rollup merge of rust-lang#107629 - pitaj:rustdoc-search-deprecated, r…
Rollup merge of rust-lang#107629 - pitaj:rustdoc-search-deprecated, r…
jsha commentedon Mar 13, 2023
Fixed by #107629.