1
Fork 0

E0577 fixed Sea struct CamelCase/sea module snake_case

This commit is contained in:
CorinJG 2022-06-10 14:21:40 +01:00
parent 20e166eab4
commit 6227d89d6a

View file

@ -3,14 +3,14 @@ Something other than a module was found in visibility scope.
Erroneous code example:
```compile_fail,E0577,edition2018
pub struct sea;
pub struct Sea;
pub (in crate::sea) struct Shark; // error!
pub (in crate::Sea) struct Shark; // error!
fn main() {}
```
`sea` is not a module, therefore it is invalid to use it in a visibility path.
`Sea` is not a module, therefore it is invalid to use it in a visibility path.
To fix this error we need to ensure `sea` is a module.
Please note that the visibility scope can only be applied on ancestors!