Closed
Description
Environment: rustc 1.31.0-nightly (4bd4e41 2018-10-25) and rustc 1.30.0 (da5f414 2018-10-24)
Rustc produces E0704 error code on the following (syntactically wrong) code:
mod foo {
pub(foo) struct Bar {
x: i32
}
}
error[E0704]: incorrect visibility restriction
--> src/main.rs:35:9
|
35 | pub(foo) struct Bar {
| ^^^ help: make this visible only to module `foo` with `in`: `in foo`
|
= help: some possible visibility restrictions are:
`pub(crate)`: visible only on the current crate
`pub(super)`: visible only in the current module's parent
`pub(in path::to::module)`: visible only on the specified path
error: aborting due to previous error
For more information about this error, try `rustc --explain E0704`.
But but neither rustc --explain E0704
nor https://doc.rust-lang.org/error-index.html
is aware of this error