1error[E0446]: private type `types::Priv` in public interface 2 --> $DIR/private-in-public.rs:13:5 3 | 4LL | struct Priv; 5 | ------------ `types::Priv` declared as private 6... 7LL | pub const C: Priv = Priv; 8 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 9 10error[E0446]: private type `types::Priv` in public interface 11 --> $DIR/private-in-public.rs:14:5 12 | 13LL | struct Priv; 14 | ------------ `types::Priv` declared as private 15... 16LL | pub static S: Priv = Priv; 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 18 19error[E0446]: private type `types::Priv` in public interface 20 --> $DIR/private-in-public.rs:15:5 21 | 22LL | struct Priv; 23 | ------------ `types::Priv` declared as private 24... 25LL | pub fn f1(arg: Priv) {} 26 | ^^^^^^^^^^^^^^^^^^^^ can't leak private type 27 28error[E0446]: private type `types::Priv` in public interface 29 --> $DIR/private-in-public.rs:16:5 30 | 31LL | struct Priv; 32 | ------------ `types::Priv` declared as private 33... 34LL | pub fn f2() -> Priv { panic!() } 35 | ^^^^^^^^^^^^^^^^^^^ can't leak private type 36 37error[E0446]: private type `types::Priv` in public interface 38 --> $DIR/private-in-public.rs:17:19 39 | 40LL | struct Priv; 41 | ------------ `types::Priv` declared as private 42... 43LL | pub struct S1(pub Priv); 44 | ^^^^^^^^ can't leak private type 45 46error[E0446]: private type `types::Priv` in public interface 47 --> $DIR/private-in-public.rs:18:21 48 | 49LL | struct Priv; 50 | ------------ `types::Priv` declared as private 51... 52LL | pub struct S2 { pub field: Priv } 53 | ^^^^^^^^^^^^^^^ can't leak private type 54 55error[E0446]: private type `types::Priv` in public interface 56 --> $DIR/private-in-public.rs:20:9 57 | 58LL | struct Priv; 59 | ------------ `types::Priv` declared as private 60... 61LL | pub const C: Priv = Priv; 62 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 63 64error[E0446]: private type `types::Priv` in public interface 65 --> $DIR/private-in-public.rs:21:9 66 | 67LL | struct Priv; 68 | ------------ `types::Priv` declared as private 69... 70LL | pub fn f1(arg: Priv) {} 71 | ^^^^^^^^^^^^^^^^^^^^ can't leak private type 72 73error[E0446]: private type `types::Priv` in public interface 74 --> $DIR/private-in-public.rs:22:9 75 | 76LL | struct Priv; 77 | ------------ `types::Priv` declared as private 78... 79LL | pub fn f2() -> Priv { panic!() } 80 | ^^^^^^^^^^^^^^^^^^^ can't leak private type 81 82error[E0445]: private trait `traits::PrivTr` in public interface 83 --> $DIR/private-in-public.rs:31:5 84 | 85LL | trait PrivTr {} 86 | ------------ `traits::PrivTr` declared as private 87... 88LL | pub enum E<T: PrivTr> { V(T) } 89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 90 91error[E0445]: private trait `traits::PrivTr` in public interface 92 --> $DIR/private-in-public.rs:32:5 93 | 94LL | trait PrivTr {} 95 | ------------ `traits::PrivTr` declared as private 96... 97LL | pub fn f<T: PrivTr>(arg: T) {} 98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 99 100error[E0445]: private trait `traits::PrivTr` in public interface 101 --> $DIR/private-in-public.rs:33:5 102 | 103LL | trait PrivTr {} 104 | ------------ `traits::PrivTr` declared as private 105... 106LL | pub struct S1<T: PrivTr>(T); 107 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 108 109error[E0445]: private trait `traits::PrivTr` in public interface 110 --> $DIR/private-in-public.rs:34:5 111 | 112LL | trait PrivTr {} 113 | ------------ `traits::PrivTr` declared as private 114... 115LL | / impl<T: PrivTr> Pub<T> { 116LL | | pub fn f<U: PrivTr>(arg: U) {} 117LL | | } 118 | |_____^ can't leak private trait 119 120error[E0445]: private trait `traits::PrivTr` in public interface 121 --> $DIR/private-in-public.rs:35:9 122 | 123LL | trait PrivTr {} 124 | ------------ `traits::PrivTr` declared as private 125... 126LL | pub fn f<U: PrivTr>(arg: U) {} 127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 128 129error[E0445]: private trait `traits_where::PrivTr` in public interface 130 --> $DIR/private-in-public.rs:44:5 131 | 132LL | trait PrivTr {} 133 | ------------ `traits_where::PrivTr` declared as private 134... 135LL | pub enum E<T> where T: PrivTr { V(T) } 136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 137 138error[E0445]: private trait `traits_where::PrivTr` in public interface 139 --> $DIR/private-in-public.rs:46:5 140 | 141LL | trait PrivTr {} 142 | ------------ `traits_where::PrivTr` declared as private 143... 144LL | pub fn f<T>(arg: T) where T: PrivTr {} 145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 146 147error[E0445]: private trait `traits_where::PrivTr` in public interface 148 --> $DIR/private-in-public.rs:48:5 149 | 150LL | trait PrivTr {} 151 | ------------ `traits_where::PrivTr` declared as private 152... 153LL | pub struct S1<T>(T) where T: PrivTr; 154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 155 156error[E0445]: private trait `traits_where::PrivTr` in public interface 157 --> $DIR/private-in-public.rs:50:5 158 | 159LL | trait PrivTr {} 160 | ------------ `traits_where::PrivTr` declared as private 161... 162LL | / impl<T> Pub<T> where T: PrivTr { 163LL | | 164LL | | pub fn f<U>(arg: U) where U: PrivTr {} 165LL | | 166LL | | } 167 | |_____^ can't leak private trait 168 169error[E0445]: private trait `traits_where::PrivTr` in public interface 170 --> $DIR/private-in-public.rs:52:9 171 | 172LL | trait PrivTr {} 173 | ------------ `traits_where::PrivTr` declared as private 174... 175LL | pub fn f<U>(arg: U) where U: PrivTr {} 176 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 177 178error[E0446]: private type `generics::Priv` in public interface 179 --> $DIR/private-in-public.rs:63:5 180 | 181LL | struct Priv<T = u8>(T); 182 | ----------------------- `generics::Priv` declared as private 183... 184LL | pub fn f1(arg: [Priv; 1]) {} 185 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 186 187error[E0446]: private type `generics::Priv` in public interface 188 --> $DIR/private-in-public.rs:64:5 189 | 190LL | struct Priv<T = u8>(T); 191 | ----------------------- `generics::Priv` declared as private 192... 193LL | pub fn f2(arg: Pub<Priv>) {} 194 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 195 196error[E0446]: private type `generics::Priv<generics::Pub>` in public interface 197 --> $DIR/private-in-public.rs:65:5 198 | 199LL | struct Priv<T = u8>(T); 200 | ----------------------- `generics::Priv<generics::Pub>` declared as private 201... 202LL | pub fn f3(arg: Priv<Pub>) {} 203 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 204 205error[E0446]: private type `impls::Priv` in public interface 206 --> $DIR/private-in-public.rs:80:9 207 | 208LL | struct Priv; 209 | ------------ `impls::Priv` declared as private 210... 211LL | pub fn f(arg: Priv) {} 212 | ^^^^^^^^^^^^^^^^^^^ can't leak private type 213 214error[E0445]: private trait `aliases_pub::PrivTr` in public interface 215 --> $DIR/private-in-public.rs:104:5 216 | 217LL | trait PrivTr { 218 | ------------ `aliases_pub::PrivTr` declared as private 219... 220LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 222 223error[E0446]: private type `aliases_pub::Priv` in public interface 224 --> $DIR/private-in-public.rs:104:5 225 | 226LL | struct Priv; 227 | ------------ `aliases_pub::Priv` declared as private 228... 229LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 230 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 231 232error[E0446]: private type `aliases_pub::Priv` in public interface 233 --> $DIR/private-in-public.rs:109:9 234 | 235LL | struct Priv; 236 | ------------ `aliases_pub::Priv` declared as private 237... 238LL | pub fn f(arg: Priv) {} 239 | ^^^^^^^^^^^^^^^^^^^ can't leak private type 240 241error[E0446]: private type `Priv1` in public interface 242 --> $DIR/private-in-public.rs:131:5 243 | 244LL | struct Priv1; 245 | ------------- `Priv1` declared as private 246... 247LL | pub fn f1(arg: PrivUseAlias) {} 248 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 249 250error[E0446]: private type `Priv2` in public interface 251 --> $DIR/private-in-public.rs:132:5 252 | 253LL | struct Priv2; 254 | ------------- `Priv2` declared as private 255... 256LL | pub fn f2(arg: PrivAlias) {} 257 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 258 259error[E0445]: private trait `aliases_priv::PrivTr` in public interface 260 --> $DIR/private-in-public.rs:133:5 261 | 262LL | trait PrivTr { 263 | ------------ `aliases_priv::PrivTr` declared as private 264... 265LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 266 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait 267 268error[E0446]: private type `aliases_priv::Priv` in public interface 269 --> $DIR/private-in-public.rs:133:5 270 | 271LL | struct Priv; 272 | ------------ `aliases_priv::Priv` declared as private 273... 274LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 276 277error[E0446]: private type `aliases_params::Priv` in public interface 278 --> $DIR/private-in-public.rs:143:5 279 | 280LL | struct Priv; 281 | ------------ `aliases_params::Priv` declared as private 282... 283LL | pub fn f2(arg: PrivAliasGeneric) {} 284 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 285 286error[E0446]: private type `aliases_params::Priv` in public interface 287 --> $DIR/private-in-public.rs:145:5 288 | 289LL | struct Priv; 290 | ------------ `aliases_params::Priv` declared as private 291... 292LL | pub fn f3(arg: Result<u8>) {} 293 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type 294 295error: aborting due to 32 previous errors 296 297Some errors have detailed explanations: E0445, E0446. 298For more information about an error, try `rustc --explain E0445`. 299