error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:13:5 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:14:5 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub static S: Priv = Priv; //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:15:5 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:16:5 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:17:19 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub struct S1(pub Priv); //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:18:21 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub struct S2 { pub field: Priv } //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:20:9 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:21:9 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `types::Priv` in public interface --> $DIR/private-in-public.rs:22:9 | LL | struct Priv; | - `types::Priv` declared as private ... LL | pub fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `traits::PrivTr` in public interface --> $DIR/private-in-public.rs:31:5 | LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... LL | pub enum E { V(T) } //~ ERROR private trait `traits::PrivTr` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface --> $DIR/private-in-public.rs:32:5 | LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... LL | pub fn f(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface --> $DIR/private-in-public.rs:33:5 | LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... LL | pub struct S1(T); //~ ERROR private trait `traits::PrivTr` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface --> $DIR/private-in-public.rs:34:5 | LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... LL | / impl Pub { //~ ERROR private trait `traits::PrivTr` in public interface LL | | pub fn f(arg: U) {} //~ ERROR private trait `traits::PrivTr` in public interface LL | | } | |_____^ can't leak private trait error[E0445]: private trait `traits::PrivTr` in public interface --> $DIR/private-in-public.rs:35:9 | LL | trait PrivTr {} | - `traits::PrivTr` declared as private ... LL | pub fn f(arg: U) {} //~ ERROR private trait `traits::PrivTr` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits_where::PrivTr` in public interface --> $DIR/private-in-public.rs:44:5 | LL | trait PrivTr {} | - `traits_where::PrivTr` declared as private ... LL | pub enum E where T: PrivTr { V(T) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits_where::PrivTr` in public interface --> $DIR/private-in-public.rs:46:5 | LL | trait PrivTr {} | - `traits_where::PrivTr` declared as private ... LL | pub fn f(arg: T) where T: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits_where::PrivTr` in public interface --> $DIR/private-in-public.rs:48:5 | LL | trait PrivTr {} | - `traits_where::PrivTr` declared as private ... LL | pub struct S1(T) where T: PrivTr; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0445]: private trait `traits_where::PrivTr` in public interface --> $DIR/private-in-public.rs:50:5 | LL | trait PrivTr {} | - `traits_where::PrivTr` declared as private ... LL | / impl Pub where T: PrivTr { LL | | //~^ ERROR private trait `traits_where::PrivTr` in public interface LL | | pub fn f(arg: U) where U: PrivTr {} LL | | //~^ ERROR private trait `traits_where::PrivTr` in public interface LL | | } | |_____^ can't leak private trait error[E0445]: private trait `traits_where::PrivTr` in public interface --> $DIR/private-in-public.rs:52:9 | LL | trait PrivTr {} | - `traits_where::PrivTr` declared as private ... LL | pub fn f(arg: U) where U: PrivTr {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0446]: private type `generics::Priv` in public interface --> $DIR/private-in-public.rs:63:5 | LL | struct Priv(T); | - `generics::Priv` declared as private ... LL | pub fn f1(arg: [Priv; 1]) {} //~ ERROR private type `generics::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `generics::Priv` in public interface --> $DIR/private-in-public.rs:64:5 | LL | struct Priv(T); | - `generics::Priv` declared as private ... LL | pub fn f2(arg: Pub) {} //~ ERROR private type `generics::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `generics::Priv` in public interface --> $DIR/private-in-public.rs:65:5 | LL | struct Priv(T); | - `generics::Priv` declared as private ... LL | pub fn f3(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `impls::Priv` in public interface --> $DIR/private-in-public.rs:80:9 | LL | struct Priv; | - `impls::Priv` declared as private ... LL | pub fn f(arg: Priv) {} //~ ERROR private type `impls::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `aliases_pub::PrivTr` in public interface --> $DIR/private-in-public.rs:104:5 | LL | trait PrivTr { | - `aliases_pub::PrivTr` declared as private ... LL | pub fn f3(arg: ::Assoc) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0446]: private type `aliases_pub::Priv` in public interface --> $DIR/private-in-public.rs:104:5 | LL | struct Priv; | - `aliases_pub::Priv` declared as private ... LL | pub fn f3(arg: ::Assoc) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_pub::Priv` in public interface --> $DIR/private-in-public.rs:109:9 | LL | struct Priv; | - `aliases_pub::Priv` declared as private ... LL | pub fn f(arg: Priv) {} //~ ERROR private type `aliases_pub::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_priv::Priv1` in public interface --> $DIR/private-in-public.rs:131:5 | LL | struct Priv1; | - `aliases_priv::Priv1` declared as private ... LL | pub fn f1(arg: PrivUseAlias) {} //~ ERROR private type `aliases_priv::Priv1` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_priv::Priv2` in public interface --> $DIR/private-in-public.rs:132:5 | LL | struct Priv2; | - `aliases_priv::Priv2` declared as private ... LL | pub fn f2(arg: PrivAlias) {} //~ ERROR private type `aliases_priv::Priv2` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `aliases_priv::PrivTr` in public interface --> $DIR/private-in-public.rs:133:5 | LL | trait PrivTr { | - `aliases_priv::PrivTr` declared as private ... LL | pub fn f3(arg: ::Assoc) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait error[E0446]: private type `aliases_priv::Priv` in public interface --> $DIR/private-in-public.rs:133:5 | LL | struct Priv; | - `aliases_priv::Priv` declared as private ... LL | pub fn f3(arg: ::Assoc) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_params::Priv` in public interface --> $DIR/private-in-public.rs:143:5 | LL | struct Priv; | - `aliases_params::Priv` declared as private ... LL | pub fn f2(arg: PrivAliasGeneric) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `aliases_params::Priv` in public interface --> $DIR/private-in-public.rs:145:5 | LL | struct Priv; | - `aliases_params::Priv` declared as private ... LL | pub fn f3(arg: Result) {} //~ ERROR private type `aliases_params::Priv` in public interface | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 32 previous errors Some errors occurred: E0445, E0446. For more information about an error, try `rustc --explain E0445`.