this post was submitted on 14 Aug 2023
30 points (96.9% liked)
Rust
6848 readers
4 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Is that always suppose to be shown? My counter example (the one that prompted this thread) is embassy_executor::Executor. When looking in the docs i dont see anywhere that its locked behind a feature flag, you have to look in the source
So, this is being worked on. But for now, that crate needs this line in
lib.rs
And this line in
Cargo.toml
's[package.metadata.docs.rs]
section:With these changes, feature gating will be displayed in the docs.
To replicate this locally:
Didn't know about this, looking forward for this to be stabilized. But a comment on your command, it is easier to use --all-features instead of listing them all.
--all-features
doesn't work with that particular crate because two of the features conflict with each other. The features list in my command is the one used for docs.rs from the crate'sCargo.toml
.