Crate thet facilitates the documentation of feature-gated code. This crate requires the use of the doc_cfg nightly feature.
Remember to add the following to your Cargo.toml file for the crate make efect when documenting on docs.rs
all-features = true
rustdoc-args =
And when generating local documentation, use
cargo rustdoc -- --cfg docsrs
Example