In code it looks like this: ```rust #[cfg(feature = "my_feature")] #[cfg_attr(docsrs, doc(cfg(feature = "my_feature")))] struct Foo; ``` And in `Cargo.toml`: ``` [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] ``` Rendered result can be seen for example in the `digest` [docs](https://docs.rs/digest/). Also I think it will be nice to document crate features and indicate those enabled by default in the `lib.rs` docs.