mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 06:16:06 +00:00
Rollup merge of #73720 - GuillaumeGomez:cleanup-e0704, r=Dylan-DPC
Clean up E0704 error explanation r? @Dylan-DPC
This commit is contained in:
commit
5e61827dd3
@ -1,6 +1,6 @@
|
||||
This error indicates that a incorrect visibility restriction was specified.
|
||||
An incorrect visibility restriction was specified.
|
||||
|
||||
Example of erroneous code:
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0704
|
||||
mod foo {
|
||||
@ -12,6 +12,7 @@ mod foo {
|
||||
|
||||
To make struct `Bar` only visible in module `foo` the `in` keyword should be
|
||||
used:
|
||||
|
||||
```
|
||||
mod foo {
|
||||
pub(in crate::foo) struct Bar {
|
||||
|
Loading…
Reference in New Issue
Block a user