blob: 7b64623e16c3e193fd03bd260f0bd47cabb4d8f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Tests that inherited visibility applies to methods.
mod a {
pub struct Foo;
impl Foo {
fn f(self) {}
}
}
fn main() {
let x = a::Foo;
x.f(); //~ ERROR method `f` is private
}
|