rust-lang / rust-lang/rust

[rustdoc] Add new (cfg) feature search filtering/tab

Open
#144,263 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-cfg A-rustdoc-search C-enhancement T-rustdoc T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

When searching via s, it would be nice to find items affected by a certain feature, and to allow valid feature names to be searchable.

Take Tokio, which reports it supports the test-util feature:

Image

When I now try to search for test-util, I get this:

Image

Given that the docs are already somewhat aware of the used features per item

Image

It would be nice if, for example, the search result tabs could have a category listing the affected items instead:

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior by searching for test-util with s in the Tokio documentation, then inspect how rustdoc already displays per-item feature information. Define how valid feature names and feature-affected items should appear in search results, including the proposed category tab, and verify that the resulting search behavior matches the examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.