Skip to content

Can't find E0704 error code info #55398

Closed
@Undin

Description

@Undin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsP-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions