rust/tests/ui/imports/issue-33464.stderr
Esteban Küber b61570ac11 Structured suggestion for extern crate foo when foo isn't resolved in import
When encountering a name in an import that could have come from a crate that wasn't imported, use a structured suggestion to suggest `extern crate foo;` pointing at the right place in the crate.

When encountering `_` in an import, do not suggest `extern crate _;`.

```
error[E0432]: unresolved import `spam`
  --> $DIR/import-from-missing-star-3.rs:2:9
   |
LL |     use spam::*;
   |         ^^^^ maybe a missing crate `spam`?
   |
help: consider importing the `spam` crate
   |
LL + extern crate spam;
   |
```
2024-07-29 23:49:51 +00:00

37 lines
864 B
Plaintext

error[E0432]: unresolved import `abc`
--> $DIR/issue-33464.rs:3:5
|
LL | use abc::one_el;
| ^^^ you might be missing crate `abc`
|
help: consider importing the `abc` crate
|
LL + extern crate abc;
|
error[E0432]: unresolved import `abc`
--> $DIR/issue-33464.rs:5:5
|
LL | use abc::{a, bbb, cccccc};
| ^^^ you might be missing crate `abc`
|
help: consider importing the `abc` crate
|
LL + extern crate abc;
|
error[E0432]: unresolved import `a_very_long_name`
--> $DIR/issue-33464.rs:7:5
|
LL | use a_very_long_name::{el, el2};
| ^^^^^^^^^^^^^^^^ you might be missing crate `a_very_long_name`
|
help: consider importing the `a_very_long_name` crate
|
LL + extern crate a_very_long_name;
|
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0432`.