When conditionally deriving a trait using cfg_attr
, the feature gate is not documented.
(present in 1.66.0-nightly)
- Build the documentation of this project with
cargo +nightly doc --all-features --open
. - View the documentation for the struct
Test
. Debug
should be documentated as only active with thedebug
feature flag set.
#![feature(doc_auto_cfg)]
#[derive(Default)]
#[cfg_attr(feature = "debug", derive(Debug))]
pub struct Test();