-
-
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
"use of undeclared crate or module mio
" when building docs of dependent on nightly with --cfg docsrs
#6165
Comments
It sounds like Tokio only compiles under That said, you said that you are using RUSTDOCFLAGS only, and not RUSTFLAGS when documenting your own crate? That is very confusing to me, because RUSTDOCFLAGS only applies to the crate being documented, and not to dependencies, so I'm not sure how this affected Tokio. Are you also documenting Tokio itself directly? |
Nope, I'm just running |
How about renaming the flag used by tokio from |
Version
tokio v1.34.0
tokio-macros v2.2.0
tokio-stream v0.1.14
Platform
Darwin Johns-Laptop-4.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64
Description
I have a library that has an optional dependency on tokio, and it uses docs.rs' support for marking feature-gated items. When I attempt to generate the documentation with the feature-gate annotations locally by running
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
, I get the following errors:A lot of "use of undeclared crate or module `mio`"
The docs build successfully if I omit
RUSTDOCFLAGS="--cfg docsrs"
,--all-features
, and/or+nightly
. The docs also built fine on docs.rs twelve hours ago.For the record, the tokio parts of my
Cargo.toml
are:The text was updated successfully, but these errors were encountered: