You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building an example, cargo provides crates listed under both dependencies and dev-dependencies to the build. However cargo doc --example foo only passes the regular dependencies, resulting in unresolved import etc. errors for any symbols which aren't necessary for downstream use.
Thanks for the detailed report! This has been fixed in #10341 which should be in the 1.60 release. It isn't in nightly, yet, but it should be in a few days.
Closing as a duplicate of #9198.
Problem
When building an example,
cargo
provides crates listed under bothdependencies
anddev-dependencies
to the build. Howevercargo doc --example foo
only passes the regular dependencies, resulting in unresolved import etc. errors for any symbols which aren't necessary for downstream use.Steps
Possible Solution(s)
Probably the
cargo doc
command should receive the same dependency list as other subcommands under the--example
or--examples
switches.Notes
cargo doc --example
was added in #9808.Version
The text was updated successfully, but these errors were encountered: