mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +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; | ```
9 lines
252 B
Rust
9 lines
252 B
Rust
// Testing that we don't fail abnormally after hitting the errors
|
|
|
|
use unresolved::*;
|
|
//~^ ERROR unresolved import `unresolved` [E0432]
|
|
//~| NOTE you might be missing crate `unresolved`
|
|
//~| HELP consider importing the `unresolved` crate
|
|
|
|
fn main() {}
|