]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/private-inferred-type-1.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / privacy / private-inferred-type-1.rs
1 trait Arr0 {
2 fn arr0_secret(&self);
3 }
4 trait TyParam {
5 fn ty_param_secret(&self);
6 }
7
8 mod m {
9 struct Priv;
10
11 impl ::Arr0 for [Priv; 0] { fn arr0_secret(&self) {} }
12 impl ::TyParam for Option<Priv> { fn ty_param_secret(&self) {} }
13 }
14
15 fn main() {
16 [].arr0_secret(); //~ ERROR type `Priv` is private
17 None.ty_param_secret(); //~ ERROR type `Priv` is private
18 }