mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +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; | ```
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
error[E0577]: expected module, found enum `E`
|
|
--> $DIR/resolve-bad-visibility.rs:4:8
|
|
|
|
|
LL | pub(in E) struct S;
|
|
| ^ not a module
|
|
|
|
error[E0577]: expected module, found trait `Tr`
|
|
--> $DIR/resolve-bad-visibility.rs:5:8
|
|
|
|
|
LL | pub(in Tr) struct Z;
|
|
| ^^ not a module
|
|
|
|
error[E0742]: visibilities can only be restricted to ancestor modules
|
|
--> $DIR/resolve-bad-visibility.rs:6:8
|
|
|
|
|
LL | pub(in std::vec) struct F;
|
|
| ^^^^^^^^
|
|
|
|
error[E0433]: failed to resolve: you might be missing crate `nonexistent`
|
|
--> $DIR/resolve-bad-visibility.rs:7:8
|
|
|
|
|
LL | pub(in nonexistent) struct G;
|
|
| ^^^^^^^^^^^ you might be missing crate `nonexistent`
|
|
|
|
|
help: consider importing the `nonexistent` crate
|
|
|
|
|
LL + extern crate nonexistent;
|
|
|
|
|
|
|
error[E0433]: failed to resolve: you might be missing crate `too_soon`
|
|
--> $DIR/resolve-bad-visibility.rs:8:8
|
|
|
|
|
LL | pub(in too_soon) struct H;
|
|
| ^^^^^^^^ you might be missing crate `too_soon`
|
|
|
|
|
help: consider importing the `too_soon` crate
|
|
|
|
|
LL + extern crate too_soon;
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
Some errors have detailed explanations: E0433, E0577, E0742.
|
|
For more information about an error, try `rustc --explain E0433`.
|