-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-rustdoc-searchArea: Rustdoc's search featureArea: Rustdoc's search featureT-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Description
Code
#![crate_name = "badranking"]
pub mod m {
pub fn foo() {}
pub struct BadRanking;
impl BadRanking {
pub fn foo() {}
}
}
Reproduction Steps
cargo doc --open
- search
BadRanking::new
Expected Outcome
the method badranking::m::BadRanking::foo
is the first result
Actual Output
the method badranking::m::BadRanking::foo
is nowhere to be found, only badranking::m::foo
is shown.

Version
rustdoc 1.88.0 (6b00bc388 2025-06-23)
Additional Details
discovered when searching for BitVec::new
and it wasn't the first result.
on nightly both methods are show at least, but the order is still bad:

Metadata
Metadata
Assignees
Labels
A-rustdoc-searchArea: Rustdoc's search featureArea: Rustdoc's search featureT-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.