Skip to content

Use #[doc(cfg(...))] #295

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

Open
jonas-schievink opened this issue Nov 19, 2020 · 2 comments
Open

Use #[doc(cfg(...))] #295

jonas-schievink opened this issue Nov 19, 2020 · 2 comments
Labels

Comments

@jonas-schievink
Copy link
Contributor

A lot of our API is behind #[cfg]. Currently, that fact is only sometimes indicated in the documentation, which makes it hard to figure out, but as it turns out rustdoc has a feature for that: #[doc(cfg(<...>))].

This can be used to decorate types and method with information about their availability. An example of this can be seen in the async-std docs, which marks some APIs as unstable.

@TDHolmes
Copy link
Contributor

It looks like this is getting superseded by this automatically happening for us: rust-lang/rust#89596

@TDHolmes
Copy link
Contributor

Once rust-lang/rust#43781 lands, we should get this for free if I'm understanding things properly

@newAM newAM added enhancement A-documentation Area: Documentation labels Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants