Skip to content

rustdoc doesn't automatically render "ambient" #[cfg]s on decl macros #100916

@Geobert

Description

@Geobert

I have some macros behind a feature flag and when generating the doc, they don't have the feature badge.
I had to mark each of them manually with doc(cfg(feature = "my_feature")) (and in an cfg_attr to keep compiling on stable)

I'm not sure if this is intended or not but I couldn't find anything on the subject on this repo :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.F-doc_cfg`#![feature(doc_cfg)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions