]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_error_codes/src/error_codes/E0578.md
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0578.md
1 A module cannot be found and therefore, the visibility cannot be determined.
2
3 Erroneous code example:
4
5 ```compile_fail,E0578,edition2018
6 foo!();
7
8 pub (in ::Sea) struct Shark; // error!
9
10 fn main() {}
11 ```
12
13 Because of the call to the `foo` macro, the compiler guesses that the missing
14 module could be inside it and fails because the macro definition cannot be
15 found.
16
17 To fix this error, please be sure that the module is in scope:
18
19 ```edition2018
20 pub mod Sea {
21 pub (in crate::Sea) struct Shark;
22 }
23
24 fn main() {}
25 ```