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

Document what features are required for feature-gated items #2807

Closed
jwodder opened this issue Dec 6, 2023 · 1 comment
Closed

Document what features are required for feature-gated items #2807

jwodder opened this issue Dec 6, 2023 · 1 comment

Comments

@jwodder
Copy link

jwodder commented Dec 6, 2023

One way to document this would be to use doc(cfg(feature = ...))) as described at https://users.rust-lang.org/t/how-to-document-optional-features-in-api-docs/64577/3, but I don't know how that would work with the large amount of re-exporting this workspace does.

@taiki-e
Copy link
Member

taiki-e commented Dec 7, 2023

This has already been done (e.g., see https://docs.rs/futures-util/latest/futures_util/#modules), but there are some issues that it doesn't work well in the re-export (i.e. documentation of futures), and the scope of features with the same name is different in futures and futures-util. Some of these should be fixed automatically as a side effect of other work for 0.4 (#2804), but I would accept patches if you have ideas for improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants