Closed
Description
Consider the following program.
mod inner_mod {
pub struct MyInnerStruct;
}
fn main() {
let _s = MyInnerStruct {};
}
When compiled with --edition 2018
with the 6 July nightly, we get this error message:
error[E0422]: cannot find struct, variant or union type `MyInnerStruct` in this scope
--> import_suggestion.rs:6:14
|
6 | let _s = MyInnerStruct {};
| ^^^^^^^^^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
|
1 | use inner_mod::MyInnerStruct;
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0422`.
But if we take the suggestion literally (and continue using the 2018 edition), inner_mod
is presumed to be a crate:
error[E0463]: can't find crate for `inner_mod`
--> import_suggestion.rs:1:5
|
1 | use inner_mod::MyInnerStruct;
| ^^^^^^^^^ can't find crate
error: aborting due to previous error
A pull request is forthcoming.
Metadata
Metadata
Assignees
Labels
No labels