mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
b61570ac11
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; | ```
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
error[E0432]: unresolved import `nonexistent_module`
|
|
--> $DIR/issue-53269.rs:6:9
|
|
|
|
|
LL | use nonexistent_module::mac;
|
|
| ^^^^^^^^^^^^^^^^^^ you might be missing crate `nonexistent_module`
|
|
|
|
|
help: consider importing the `nonexistent_module` crate
|
|
|
|
|
LL + extern crate nonexistent_module;
|
|
|
|
|
|
|
error[E0659]: `mac` is ambiguous
|
|
--> $DIR/issue-53269.rs:8:5
|
|
|
|
|
LL | mac!();
|
|
| ^^^ ambiguous name
|
|
|
|
|
= note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
|
|
note: `mac` could refer to the macro defined here
|
|
--> $DIR/issue-53269.rs:3:1
|
|
|
|
|
LL | macro_rules! mac { () => () }
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
note: `mac` could also refer to the unresolved item imported here
|
|
--> $DIR/issue-53269.rs:6:9
|
|
|
|
|
LL | use nonexistent_module::mac;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
= help: use `self::mac` to refer to this unresolved item unambiguously
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0432, E0659.
|
|
For more information about an error, try `rustc --explain E0432`.
|