]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-inferred-type-2.rs
update ui tests
[rust.git] / src / test / ui / privacy / private-inferred-type-2.rs
1 // aux-build:private-inferred-type.rs
2
3 extern crate private_inferred_type as ext;
4
5 mod m {
6     struct Priv;
7     pub struct Pub<T>(pub T);
8
9     impl Pub<Priv> {
10         pub fn get_priv() -> Priv { Priv }
11         pub fn static_method() {}
12     }
13 }
14
15 fn main() {
16     m::Pub::get_priv; //~ ERROR type `m::Priv` is private
17     m::Pub::static_method; //~ ERROR type `m::Priv` is private
18     ext::Pub::static_method; //~ ERROR type `ext::Priv` is private
19 }