You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mod inner_mod {pubstructMyInnerStruct;}fnmain(){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.
The text was updated successfully, but these errors were encountered:
Consider the following program.
When compiled with
--edition 2018
with the 6 July nightly, we get this error message:But if we take the suggestion literally (and continue using the 2018 edition),
inner_mod
is presumed to be a crate:A pull request is forthcoming.
The text was updated successfully, but these errors were encountered: