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; | ^^^^^^^^^^^^^^^^^ 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; | ^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^^ 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!() } | ^^^^^^^^^^^^^^^^^^^ 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); | ^^^^^^^^ 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 } | ^^^^^^^^^^^^^^^ 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; | ^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^^ 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!() } | ^^^^^^^^^^^^^^^^^^^ 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) } | ^^^^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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); | ^^^^^^^^^^^^^^^^^^^^^^^^ 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 { | ^^^^^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 { | ^^^^^^^^^^^^^^ 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]) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `Priv1` in public interface --> $DIR/private-in-public.rs:131:5 | LL | struct Priv1; | ------------ `Priv1` declared as private ... LL | pub fn f1(arg: PrivUseAlias) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `Priv2` in public interface --> $DIR/private-in-public.rs:132:5 | LL | struct Priv2; | ------------ `Priv2` declared as private ... LL | pub fn f2(arg: PrivAlias) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 32 previous errors Some errors have detailed explanations: E0445, E0446. For more information about an error, try `rustc --explain E0445`.