]> git.lizzy.rs Git - rust.git/blob - tests/ui/privacy/private-method-inherited.rs
Auto merge of #106780 - flip1995:clippyup, r=Manishearth
[rust.git] / tests / 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 }