Skip to content
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

Rustdoc should note default-feature in item descriptions #105669

Open
sinistersnare opened this issue Dec 13, 2022 · 1 comment
Open

Rustdoc should note default-feature in item descriptions #105669

sinistersnare opened this issue Dec 13, 2022 · 1 comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@sinistersnare
Copy link
Contributor

sinistersnare commented Dec 13, 2022

Currently, if an item is feature-gated (Such as Axum's Query struct), it is noted at the top. That is awesome! However, the Query struct is available by default, as the query feature is a Cargo default-feature. This is confusing wording IMO.

I think that if that feature is marked as a default feature, that should be noted too. As is the wording: "Available on crate feature FEATURE only." implies it wont work by default.

@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 14, 2022
@camelid camelid added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Dec 16, 2022
@RodBurman
Copy link

Agreed it would be clearer in these cases for the documentation to say something like: "Available on crate feature FEATURE only. Feature FEATURE is enabled by default."; thus highlighting that configuration changes are only required if the user wants to disable the feature for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants