]>
Commit | Line | Data |
---|---|---|
041b39d2 XL |
1 | trait Arr0 { |
2 | fn arr0_secret(&self); | |
3 | } | |
4 | trait TyParam { | |
5 | fn ty_param_secret(&self); | |
6 | } | |
7 | ||
fe692bf9 FG |
8 | trait Ref { |
9 | fn ref_secret(self); | |
10 | } | |
11 | ||
041b39d2 XL |
12 | mod m { |
13 | struct Priv; | |
223e47cc | 14 | |
041b39d2 XL |
15 | impl ::Arr0 for [Priv; 0] { fn arr0_secret(&self) {} } |
16 | impl ::TyParam for Option<Priv> { fn ty_param_secret(&self) {} } | |
fe692bf9 | 17 | impl<'a> ::Ref for &'a Priv { fn ref_secret(self) {} } |
9cc50fc6 | 18 | } |
223e47cc | 19 | |
fe692bf9 FG |
20 | fn anyref<'a, T>() -> &'a T { panic!() } |
21 | ||
9cc50fc6 | 22 | fn main() { |
1b1a35ee XL |
23 | [].arr0_secret(); //~ ERROR type `Priv` is private |
24 | None.ty_param_secret(); //~ ERROR type `Priv` is private | |
fe692bf9 FG |
25 | Ref::ref_secret(anyref()); |
26 | //~^ ERROR type `Priv` is private | |
27 | //~| ERROR type `Priv` is private | |
9cc50fc6 | 28 | } |