Skip to content

rustdoc: search should prioritize matching capitalization #119480

@joshtriplett

Description

@joshtriplett

It's good that rustdoc's search is case-insensitive, to make it easier for people to find what they're looking for. However, if the user types in capitalization that exactly matches (or more closely matches) a given type, rustdoc's search results should prioritize that type over things that don't match in case.

For example, https://doc.rust-lang.org/std/?search=Copy (note the capital C) should list std::marker::Copy at the top, not std::fs::copy.

Metadata

Metadata

Assignees

Labels

A-rustdoc-searchArea: Rustdoc's search featureC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions