Skip to content

Conditionally derived traits using cfg_attr are not documented as being behind a feature flag. #103300

Open

Description

When conditionally deriving a trait using cfg_attr, the doc_cfg feature gate is not documented. A minimal example can be found here, but is summarised below:

Example:

 #![feature(doc_auto_cfg)]
 #[cfg_attr(feature = "debug", derive(Debug))]
 pub struct Test();

Generates:

generated

Expectation:

expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    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