Closed
Description
Consider the following code:
mod foo {
mod bar { // `bar` should only be visible inside `foo`
pub struct S;
}
pub use self::bar::S;
}
impl foo::S {
fn f() {}
pub fn g() {}
}
fn main() {
foo::bar::S::f(); //< yet this line compiles
// foo::bar::S::g(); //< this line would give the correct privacy error
}
Metadata
Metadata
Assignees
Labels
No labels