]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-method-inherited.rs
Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree
[rust.git] / src / test / ui / privacy / private-method-inherited.rs
1 // Tests that inherited visibility applies to methods.
2
3 mod a {
4     pub struct Foo;
5
6     impl Foo {
7         fn f(self) {}
8     }
9 }
10
11 fn main() {
12     let x = a::Foo;
13     x.f();  //~ ERROR associated function `f` is private
14 }