-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
docs: annotate io mod with doc_cfg #1808
Conversation
Annotates types in `tokio::io` module with their required feature flag. This annotation is included in generated documentation. Notes: * The annotation must be on the type or function itself. Annotating just the re-export is not sufficient. * The annotation must be **inside** the `pin_project!` macro or it is lost.
Once we land on specifics for style, it can be applied to the rest of the crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 We should prob add docs on how to build the docs with the flags enabled.
Perhaps we need to update CI config. tokio/ci/azure-deploy-docs.yml Line 18 in 8546ff8
Line 77 in 8546ff8
|
tokio/src/io/util/read_to_end.rs
Outdated
cfg_io_util! { | ||
#[derive(Debug)] | ||
#[must_use = "futures do nothing unless you `.await` or poll them"] | ||
pub struct ReadToEnd<'a, R: ?Sized> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As ReadToEnd
is used internally even when io-util
feature is disabled, it seems to be necessary to use an attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReadToEnd
is only *publicly available w/ the feature. I do need to fix it though.
Co-Authored-By: Taiki Endo <[email protected]>
Co-Authored-By: Taiki Endo <[email protected]>
Annotates types in
tokio::io
module with their required feature flag.This annotation is included in generated documentation.
Notes:
The annotation must be on the type or function itself. Annotating just
the re-export is not sufficient.
The annotation must be inside the
pin_project!
macro or it islost.