File tree 1 file changed +27
-1
lines changed
1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -1823,6 +1823,33 @@ trait Hello {
1823
1823
```
1824
1824
"## ,
1825
1825
1826
+ E0577 : r##"
1827
+ Something other than a module was found in visibility scope.
1828
+
1829
+ Erroneous code example:
1830
+
1831
+ ```compile_fail,E0577,edition2018
1832
+ pub struct Sea;
1833
+
1834
+ pub (in crate::Sea) struct Shark; // error!
1835
+
1836
+ fn main() {}
1837
+ ```
1838
+
1839
+ `Sea` is not a module, therefore it is invalid to use it in a visibility path.
1840
+ To fix this error we need to ensure `Sea` is a module.
1841
+
1842
+ Please note that the visibility scope can only be applied on ancestors!
1843
+
1844
+ ```edition2018
1845
+ pub mod Sea {
1846
+ pub (in crate::Sea) struct Shark; // ok!
1847
+ }
1848
+
1849
+ fn main() {}
1850
+ ```
1851
+ "## ,
1852
+
1826
1853
E0603 : r##"
1827
1854
A private item was used outside its scope.
1828
1855
@@ -1990,6 +2017,5 @@ fn main() {}
1990
2017
// E0427, merged into 530
1991
2018
// E0467, removed
1992
2019
// E0470, removed
1993
- E0577 ,
1994
2020
E0578 ,
1995
2021
}
You can’t perform that action at this time.
0 commit comments