reference feature flags in docs#259
Conversation
|
I like the idea! I believe it's a bit noisy when marking whole modules, as mentioned in rust-lang/rust#43781 (comment). Maybe we could settle with a note in the module documentation for the time being, while the feature matures. |
|
Yeah, honestly the reason I didnt do everything yet is incase you said that. Project like Tokio has gone ahead with this approach: https://docs.rs/tokio/0.2.16/tokio/fs/index.html, https://docs.rs/tokio/0.2.16/tokio/fs/struct.File.html. Should do something to make the features clearer though. Did trip me up initially when starting with the canvas module. Note in the module doc would be fine, too. |
Agreed. After thinking some more about it, I believe it's better to be too noisy than failing to warn our users properly. I also feel the warning blends in nicely once you get used to it. And if it's too distracting, you can always run So let's keep it! I added the message to the widgets in the root crate and enabled the feature flags for |
|
LGTM |
|
Awesome. Thank you! 🥂 |
Makes it clearer when browsing docs which feature flags are needed for certain features using a docsrs config flag.
Test locally using:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --workspace --lib --no-deps --all-features --openeg:
