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
With --examples, cargo doc is supposed to document your examples too. However, the examples may need dev dependencies in order to compile, and cargo doc does not include those, leading to errors about unresolved imports.
...
error[E0432]: unresolved import `mockall_double`
--> mockall/examples/ffi.rs:8:5
|
8 | use mockall_double::double;
| ^^^^^^^^^^^^^^ use of undeclared crate or module `mockall_double`
|
help: there is a crate or module with a similar name
|
8 | use mockall_derive::double;
| ~~~~~~~~~~~~~~
...
Possible Solution(s)
cargo doc --examples should resolve dev-dependencies, just like cargo check --examples does.
For fixing: This line needs to consider other dependency kinds based on the target type. Here is how it is done for regular builds. Perhaps those can be shared?
Problem
With
--examples
,cargo doc
is supposed to document your examples too. However, the examples may need dev dependencies in order to compile, andcargo doc
does not include those, leading to errors about unresolved imports.Steps
Possible Solution(s)
cargo doc --examples
should resolve dev-dependencies, just likecargo check --examples
does.Notes
No response
Version
The text was updated successfully, but these errors were encountered: