Reword "crate not found" resolve message
``` 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` ```
This commit is contained in:
parent
dee7d0e730
commit
dd52bfc76e
108 changed files with 414 additions and 294 deletions
|
@ -2,9 +2,9 @@ error[E0432]: unresolved import `inner`
|
|||
--> $DIR/ice-unresolved-import-100241.rs:9:13
|
||||
|
|
||||
LL | pub use inner::S;
|
||||
| ^^^^^ you might be missing crate `inner`
|
||||
| ^^^^^ use of unresolved module or unlinked crate `inner`
|
||||
|
|
||||
help: consider importing the `inner` crate
|
||||
help: you might be missing a crate named `inner`, add it to your project and import it in your code
|
||||
|
|
||||
LL + extern crate inner;
|
||||
|
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0433]: failed to resolve: you might be missing crate `unresolved_crate`
|
||||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_crate`
|
||||
--> $DIR/unresolved-import-recovery.rs:3:5
|
||||
|
|
||||
LL | use unresolved_crate::module::Name;
|
||||
| ^^^^^^^^^^^^^^^^ you might be missing crate `unresolved_crate`
|
||||
| ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved_crate`
|
||||
|
|
||||
help: consider importing the `unresolved_crate` crate
|
||||
help: you might be missing a crate named `unresolved_crate`, add it to your project and import it in your code
|
||||
|
|
||||
LL + extern crate unresolved_crate;
|
||||
|
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This previously triggered an ICE.
|
||||
|
||||
pub(in crate::r#mod) fn main() {}
|
||||
//~^ ERROR failed to resolve: you might be missing crate `r#mod`
|
||||
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `r#mod`
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0433]: failed to resolve: you might be missing crate `r#mod`
|
||||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `r#mod`
|
||||
--> $DIR/issue-61732.rs:3:15
|
||||
|
|
||||
LL | pub(in crate::r#mod) fn main() {}
|
||||
| ^^^^^ you might be missing crate `r#mod`
|
||||
| ^^^^^ use of unresolved module or unlinked crate `r#mod`
|
||||
|
|
||||
help: consider importing the `r#mod` crate
|
||||
help: you might be missing a crate named `r#mod`, add it to your project and import it in your code
|
||||
|
|
||||
LL + extern crate r#mod;
|
||||
|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue