rust/src/librustc_error_codes/error_codes/E0704.md

507 B

This error indicates that a incorrect visibility restriction was specified.

Example of erroneous code:

mod foo {
    pub(foo) struct Bar {
        x: i32
    }
}

To make struct Bar only visible in module foo the in keyword should be used:

mod foo {
    pub(in crate::foo) struct Bar {
        x: i32
    }
}
# fn main() {}

For more information see the Rust Reference on Visibility.