Skip to content

rustdoc search ignores path distance when considering doc aliases #146214

@lolbinarycat

Description

@lolbinarycat

Reproduction Steps

search for usize::popcount in nightly std docs.

Expected Outcome

only usize::count_ones (and possibly isize::count_ones, due to low edit distances) should show up.

Actual Output

every count_ones method shows up.

screenshot

Version

rustdoc 1.91.0-nightly (a1208bf 2025-09-03)

Additional Details

related: #141475 #145829

Metadata

Metadata

Assignees

Labels

A-doc-aliasArea: `#[doc(alias)]`A-rustdoc-searchArea: Rustdoc's search featureC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions