File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1850,6 +1850,34 @@ fn main() {}
1850
1850
```
1851
1851
"## ,
1852
1852
1853
+ E0578 : r##"
1854
+ A module cannot be found and therefore, the visibility cannot be determined.
1855
+
1856
+ Erroneous code example:
1857
+
1858
+ ```compile_fail,E0578,edition2018
1859
+ foo!();
1860
+
1861
+ pub (in ::Sea) struct Shark; // error!
1862
+
1863
+ fn main() {}
1864
+ ```
1865
+
1866
+ Because of the call to the `foo` macro, the compiler guesses that the missing
1867
+ module could be inside it and fails because the macro definition cannot be
1868
+ found.
1869
+
1870
+ To fix this error, please be sure that the module is in scope:
1871
+
1872
+ ```edition2018
1873
+ pub mod Sea {
1874
+ pub (in crate::Sea) struct Shark;
1875
+ }
1876
+
1877
+ fn main() {}
1878
+ ```
1879
+ "## ,
1880
+
1853
1881
E0603 : r##"
1854
1882
A private item was used outside its scope.
1855
1883
@@ -2017,5 +2045,4 @@ fn main() {}
2017
2045
// E0427, merged into 530
2018
2046
// E0467, removed
2019
2047
// E0470, removed
2020
- E0578 ,
2021
2048
}
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ LL | foo!();
12
12
13
13
error: aborting due to 2 previous errors
14
14
15
+ For more information about this error, try `rustc --explain E0578`.
You can’t perform that action at this time.
0 commit comments