Skip to content

rustdoc: support searching cfg predicates #117399

Open
@jyn514

Description

@jyn514

Currently, searching macros on https://docs.rs/tokio/1.33.0/tokio/ has 0 hits. It would be nice if it pulled up https://docs.rs/tokio/1.33.0/tokio/attr.main.html, which uses doc(cfg) to tell rustdoc that it's only available when the macros feature is enabled.

Note that this will make the search parser a little more complicated, since features don't have to be valid rust identifiers (in particular, it currently chokes on test-util):
Screenshot 2023-10-30 at 10 42 02 AM

@rustbot label F-doc_cfg

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-searchArea: Rustdoc's search featureC-feature-requestCategory: A feature request, i.e: not implemented / a PR.F-doc_cfg`#![feature(doc_cfg)]`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