Files
rust/tests/ui/hygiene/extern-prelude-from-opaque-fail.stderr
Esteban Küber dd52bfc76e 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`
```
2025-01-24 01:19:50 +00:00

53 lines
1.7 KiB
Plaintext

error[E0432]: unresolved import `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:21:9
|
LL | use my_core;
| ^^^^^^^ no `my_core` in the root
error[E0432]: unresolved import `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:8:13
|
LL | use my_core;
| ^^^^^^^ no `my_core` in the root
...
LL | a!();
| ---- in this macro invocation
|
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:12:18
|
LL | fn f() { my_core::mem::drop(0); }
| ^^^^^^^ use of unresolved module or unlinked crate `my_core`
...
LL | a!();
| ---- in this macro invocation
|
= help: you might be missing a crate named `my_core`
= help: consider importing this module:
my_core::mem
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:25:14
|
LL | fn f() { my_core::mem::drop(0); }
| ^^^^^^^ use of unresolved module or unlinked crate `my_core`
|
= help: you might be missing a crate named `my_core`
help: consider importing this module
|
LL + use my_core::mem;
|
help: if you import `mem`, refer to it directly
|
LL - fn f() { my_core::mem::drop(0); }
LL + fn f() { mem::drop(0); }
|
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.