]>
git.proxmox.com Git - rustc.git/blob - tests/ui/privacy/private-type-in-interface.rs
1 // aux-build:private-inferred-type.rs
5 extern crate private_inferred_type
as ext
;
11 pub trait Trait { type X; }
12 impl Trait
for Priv { type X = u8; }
15 fn f(_
: m
::Alias
) {}
//~ ERROR type `Priv` is private
16 //~^ ERROR type `Priv` is private
17 fn f_ext(_
: ext
::Alias
) {}
//~ ERROR type `ext::Priv` is private
18 //~^ ERROR type `ext::Priv` is private
21 impl m
::Alias {}
//~ ERROR type `Priv` is private
22 impl Tr1
for ext
::Alias {}
//~ ERROR type `ext::Priv` is private
23 type A
= <m
::Alias
as m
::Trait
>::X
; //~ ERROR type `Priv` is private
26 impl<T
> Tr2
<T
> for u8 {}
27 fn g() -> impl Tr2
<m
::Alias
> { 0 }
//~ ERROR type `Priv` is private
28 fn g_ext() -> impl Tr2
<ext
::Alias
> { 0 }
//~ ERROR type `ext::Priv` is private