]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-method-inherited.rs
update ui tests
[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 method `f` is private
14 }