
``` error[E0432]: unresolved import `some_novel_crate` --> file.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` ``` On resolve errors where there might be a missing crate, mention `cargo add foo`: ``` error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From<nope::Thing> for Error { | ^^^^ use of unresolved module or unlinked crate `nope` | = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml` ```
44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
error[E0577]: expected module, found enum `E`
|
|
--> $DIR/resolve-bad-visibility.rs:4:8
|
|
|
|
|
LL | pub(in E) struct S;
|
|
| ^ not a module
|
|
|
|
error[E0577]: expected module, found trait `Tr`
|
|
--> $DIR/resolve-bad-visibility.rs:5:8
|
|
|
|
|
LL | pub(in Tr) struct Z;
|
|
| ^^ not a module
|
|
|
|
error[E0742]: visibilities can only be restricted to ancestor modules
|
|
--> $DIR/resolve-bad-visibility.rs:6:8
|
|
|
|
|
LL | pub(in std::vec) struct F;
|
|
| ^^^^^^^^
|
|
|
|
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
|
|
--> $DIR/resolve-bad-visibility.rs:7:8
|
|
|
|
|
LL | pub(in nonexistent) struct G;
|
|
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
|
|
|
|
|
help: you might be missing a crate named `nonexistent`, add it to your project and import it in your code
|
|
|
|
|
LL + extern crate nonexistent;
|
|
|
|
|
|
|
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `too_soon`
|
|
--> $DIR/resolve-bad-visibility.rs:8:8
|
|
|
|
|
LL | pub(in too_soon) struct H;
|
|
| ^^^^^^^^ use of unresolved module or unlinked crate `too_soon`
|
|
|
|
|
help: you might be missing a crate named `too_soon`, add it to your project and import it in your code
|
|
|
|
|
LL + extern crate too_soon;
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
Some errors have detailed explanations: E0433, E0577, E0742.
|
|
For more information about an error, try `rustc --explain E0433`.
|