E0577 fixed Sea struct CamelCase/sea module snake_case
This commit is contained in:
parent
20e166eab4
commit
6227d89d6a
1 changed files with 3 additions and 3 deletions
|
@ -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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue