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
If a doc test attempts to import any types declared in it's own crate, including the phrase extern crate anywhere in the code will cause the test to not compile, throwing a "unresolved import" error at the attempted import. For example, if we have struct Foo in crate bar, with the crate baz declared under dev_dependencies, these tests will all fail to compile
/// ```/// extern crate baz;/// use bar::Foo;/// ```pubstructFoo{}
/// ```/// // The phrase "extern crate" breaks this!/// use bar::Foo;/// ```pubstructFoo{}
/// ```/// use bar::Foo;/// let string = "extern crate";/// ```pubstructFoo{}
If a doc test attempts to import any types declared in it's own crate, including the phrase
extern crate
anywhere in the code will cause the test to not compile, throwing a "unresolved import" error at the attempted import. For example, if we have structFoo
in cratebar
, with the cratebaz
declared underdev_dependencies
, these tests will all fail to compileThe following error log is given by
cargo test
:The text was updated successfully, but these errors were encountered: