-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 --open
eg: