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:

Expectation:

When conditionally deriving a trait using
cfg_attr, thedoc_cfgfeature gate is not documented. A minimal example can be found here, but is summarised below:Example:
Generates:
Expectation: