fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: type `types::Priv` is more private than the item `C` 2 --> $DIR/private-in-public.rs:15:5 3 | 4LL | pub const C: Priv = Priv; 5 | ^^^^^^^^^^^^^^^^^ constant `C` is reachable at visibility `pub(crate)` 6 | 7note: but type `types::Priv` is only usable at visibility `pub(self)` 8 --> $DIR/private-in-public.rs:9:5 9 | 10LL | struct Priv; 11 | ^^^^^^^^^^^ 12 = note: `#[warn(private_interfaces)]` on by default 13 14warning: type `types::Priv` is more private than the item `S` 15 --> $DIR/private-in-public.rs:16:5 16 | 17LL | pub static S: Priv = Priv; 18 | ^^^^^^^^^^^^^^^^^^ static `S` is reachable at visibility `pub(crate)` 19 | 20note: but type `types::Priv` is only usable at visibility `pub(self)` 21 --> $DIR/private-in-public.rs:9:5 22 | 23LL | struct Priv; 24 | ^^^^^^^^^^^ 25 26warning: type `types::Priv` is more private than the item `types::f1` 27 --> $DIR/private-in-public.rs:17:5 28 | 29LL | pub fn f1(arg: Priv) {} 30 | ^^^^^^^^^^^^^^^^^^^^ function `types::f1` is reachable at visibility `pub(crate)` 31 | 32note: but type `types::Priv` is only usable at visibility `pub(self)` 33 --> $DIR/private-in-public.rs:9:5 34 | 35LL | struct Priv; 36 | ^^^^^^^^^^^ 37 38warning: type `types::Priv` is more private than the item `types::f2` 39 --> $DIR/private-in-public.rs:18:5 40 | 41LL | pub fn f2() -> Priv { panic!() } 42 | ^^^^^^^^^^^^^^^^^^^ function `types::f2` is reachable at visibility `pub(crate)` 43 | 44note: but type `types::Priv` is only usable at visibility `pub(self)` 45 --> $DIR/private-in-public.rs:9:5 46 | 47LL | struct Priv; 48 | ^^^^^^^^^^^ 49 50warning: type `types::Priv` is more private than the item `types::S1::0` 51 --> $DIR/private-in-public.rs:19:19 52 | 53LL | pub struct S1(pub Priv); 54 | ^^^^^^^^ field `types::S1::0` is reachable at visibility `pub(crate)` 55 | 56note: but type `types::Priv` is only usable at visibility `pub(self)` 57 --> $DIR/private-in-public.rs:9:5 58 | 59LL | struct Priv; 60 | ^^^^^^^^^^^ 61 62warning: type `types::Priv` is more private than the item `S2::field` 63 --> $DIR/private-in-public.rs:20:21 64 | 65LL | pub struct S2 { pub field: Priv } 66 | ^^^^^^^^^^^^^^^ field `S2::field` is reachable at visibility `pub(crate)` 67 | 68note: but type `types::Priv` is only usable at visibility `pub(self)` 69 --> $DIR/private-in-public.rs:9:5 70 | 71LL | struct Priv; 72 | ^^^^^^^^^^^ 73 74warning: type `types::Priv` is more private than the item `types::Pub::C` 75 --> $DIR/private-in-public.rs:22:9 76 | 77LL | pub const C: Priv = Priv; 78 | ^^^^^^^^^^^^^^^^^ associated constant `types::Pub::C` is reachable at visibility `pub(crate)` 79 | 80note: but type `types::Priv` is only usable at visibility `pub(self)` 81 --> $DIR/private-in-public.rs:9:5 82 | 83LL | struct Priv; 84 | ^^^^^^^^^^^ 85 86warning: type `types::Priv` is more private than the item `types::Pub::f1` 87 --> $DIR/private-in-public.rs:23:9 88 | 89LL | pub fn f1(arg: Priv) {} 90 | ^^^^^^^^^^^^^^^^^^^^ associated function `types::Pub::f1` is reachable at visibility `pub(crate)` 91 | 92note: but type `types::Priv` is only usable at visibility `pub(self)` 93 --> $DIR/private-in-public.rs:9:5 94 | 95LL | struct Priv; 96 | ^^^^^^^^^^^ 97 98warning: type `types::Priv` is more private than the item `types::Pub::f2` 99 --> $DIR/private-in-public.rs:24:9 100 | 101LL | pub fn f2() -> Priv { panic!() } 102 | ^^^^^^^^^^^^^^^^^^^ associated function `types::Pub::f2` is reachable at visibility `pub(crate)` 103 | 104note: but type `types::Priv` is only usable at visibility `pub(self)` 105 --> $DIR/private-in-public.rs:9:5 106 | 107LL | struct Priv; 108 | ^^^^^^^^^^^ 109 110warning: trait `traits::PrivTr` is more private than the item `traits::E` 111 --> $DIR/private-in-public.rs:33:5 112 | 113LL | pub enum E<T: PrivTr> { V(T) } 114 | ^^^^^^^^^^^^^^^^^^^^^ enum `traits::E` is reachable at visibility `pub(crate)` 115 | 116note: but trait `traits::PrivTr` is only usable at visibility `pub(self)` 117 --> $DIR/private-in-public.rs:29:5 118 | 119LL | trait PrivTr {} 120 | ^^^^^^^^^^^^ 121 = note: `#[warn(private_bounds)]` on by default 122 123warning: trait `traits::PrivTr` is more private than the item `traits::f` 124 --> $DIR/private-in-public.rs:34:5 125 | 126LL | pub fn f<T: PrivTr>(arg: T) {} 127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `traits::f` is reachable at visibility `pub(crate)` 128 | 129note: but trait `traits::PrivTr` is only usable at visibility `pub(self)` 130 --> $DIR/private-in-public.rs:29:5 131 | 132LL | trait PrivTr {} 133 | ^^^^^^^^^^^^ 134 135warning: trait `traits::PrivTr` is more private than the item `traits::S1` 136 --> $DIR/private-in-public.rs:35:5 137 | 138LL | pub struct S1<T: PrivTr>(T); 139 | ^^^^^^^^^^^^^^^^^^^^^^^^ struct `traits::S1` is reachable at visibility `pub(crate)` 140 | 141note: but trait `traits::PrivTr` is only usable at visibility `pub(self)` 142 --> $DIR/private-in-public.rs:29:5 143 | 144LL | trait PrivTr {} 145 | ^^^^^^^^^^^^ 146 147warning: trait `traits::PrivTr` is more private than the item `traits::Pub<T>` 148 --> $DIR/private-in-public.rs:36:5 149 | 150LL | impl<T: PrivTr> Pub<T> { 151 | ^^^^^^^^^^^^^^^^^^^^^^ implementation `traits::Pub<T>` is reachable at visibility `pub(crate)` 152 | 153note: but trait `traits::PrivTr` is only usable at visibility `pub(self)` 154 --> $DIR/private-in-public.rs:29:5 155 | 156LL | trait PrivTr {} 157 | ^^^^^^^^^^^^ 158 159warning: trait `traits::PrivTr` is more private than the item `traits::Pub::<T>::f` 160 --> $DIR/private-in-public.rs:37:9 161 | 162LL | pub fn f<U: PrivTr>(arg: U) {} 163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits::Pub::<T>::f` is reachable at visibility `pub(crate)` 164 | 165note: but trait `traits::PrivTr` is only usable at visibility `pub(self)` 166 --> $DIR/private-in-public.rs:29:5 167 | 168LL | trait PrivTr {} 169 | ^^^^^^^^^^^^ 170 171warning: trait `traits_where::PrivTr` is more private than the item `traits_where::E` 172 --> $DIR/private-in-public.rs:46:5 173 | 174LL | pub enum E<T> where T: PrivTr { V(T) } 175 | ^^^^^^^^^^^^^ enum `traits_where::E` is reachable at visibility `pub(crate)` 176 | 177note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)` 178 --> $DIR/private-in-public.rs:42:5 179 | 180LL | trait PrivTr {} 181 | ^^^^^^^^^^^^ 182 183warning: trait `traits_where::PrivTr` is more private than the item `traits_where::f` 184 --> $DIR/private-in-public.rs:48:5 185 | 186LL | pub fn f<T>(arg: T) where T: PrivTr {} 187 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `traits_where::f` is reachable at visibility `pub(crate)` 188 | 189note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)` 190 --> $DIR/private-in-public.rs:42:5 191 | 192LL | trait PrivTr {} 193 | ^^^^^^^^^^^^ 194 195warning: trait `traits_where::PrivTr` is more private than the item `traits_where::S1` 196 --> $DIR/private-in-public.rs:50:5 197 | 198LL | pub struct S1<T>(T) where T: PrivTr; 199 | ^^^^^^^^^^^^^^^^ struct `traits_where::S1` is reachable at visibility `pub(crate)` 200 | 201note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)` 202 --> $DIR/private-in-public.rs:42:5 203 | 204LL | trait PrivTr {} 205 | ^^^^^^^^^^^^ 206 207warning: trait `traits_where::PrivTr` is more private than the item `traits_where::Pub<T>` 208 --> $DIR/private-in-public.rs:52:5 209 | 210LL | impl<T> Pub<T> where T: PrivTr { 211 | ^^^^^^^^^^^^^^ implementation `traits_where::Pub<T>` is reachable at visibility `pub(crate)` 212 | 213note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)` 214 --> $DIR/private-in-public.rs:42:5 215 | 216LL | trait PrivTr {} 217 | ^^^^^^^^^^^^ 218 219warning: trait `traits_where::PrivTr` is more private than the item `traits_where::Pub::<T>::f` 220 --> $DIR/private-in-public.rs:54:9 221 | 222LL | pub fn f<U>(arg: U) where U: PrivTr {} 223 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits_where::Pub::<T>::f` is reachable at visibility `pub(crate)` 224 | 225note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)` 226 --> $DIR/private-in-public.rs:42:5 227 | 228LL | trait PrivTr {} 229 | ^^^^^^^^^^^^ 230 231warning: type `generics::Priv` is more private than the item `generics::f1` 232 --> $DIR/private-in-public.rs:65:5 233 | 234LL | pub fn f1(arg: [Priv; 1]) {} 235 | ^^^^^^^^^^^^^^^^^^^^^^^^^ function `generics::f1` is reachable at visibility `pub(crate)` 236 | 237note: but type `generics::Priv` is only usable at visibility `pub(self)` 238 --> $DIR/private-in-public.rs:60:5 239 | 240LL | struct Priv<T = u8>(T); 241 | ^^^^^^^^^^^^^^^^^^^ 242 243warning: type `generics::Priv` is more private than the item `generics::f2` 244 --> $DIR/private-in-public.rs:66:5 245 | 246LL | pub fn f2(arg: Pub<Priv>) {} 247 | ^^^^^^^^^^^^^^^^^^^^^^^^^ function `generics::f2` is reachable at visibility `pub(crate)` 248 | 249note: but type `generics::Priv` is only usable at visibility `pub(self)` 250 --> $DIR/private-in-public.rs:60:5 251 | 252LL | struct Priv<T = u8>(T); 253 | ^^^^^^^^^^^^^^^^^^^ 254 255warning: type `generics::Priv<generics::Pub>` is more private than the item `generics::f3` 256 --> $DIR/private-in-public.rs:67:5 257 | 258LL | pub fn f3(arg: Priv<Pub>) {} 259 | ^^^^^^^^^^^^^^^^^^^^^^^^^ function `generics::f3` is reachable at visibility `pub(crate)` 260 | 261note: but type `generics::Priv<generics::Pub>` is only usable at visibility `pub(self)` 262 --> $DIR/private-in-public.rs:60:5 263 | 264LL | struct Priv<T = u8>(T); 265 | ^^^^^^^^^^^^^^^^^^^ 266 267warning: type `impls::Priv` is more private than the item `impls::Pub::f` 268 --> $DIR/private-in-public.rs:82:9 269 | 270LL | pub fn f(arg: Priv) {} 271 | ^^^^^^^^^^^^^^^^^^^ associated function `impls::Pub::f` is reachable at visibility `pub(crate)` 272 | 273note: but type `impls::Priv` is only usable at visibility `pub(self)` 274 --> $DIR/private-in-public.rs:72:5 275 | 276LL | struct Priv; 277 | ^^^^^^^^^^^ 278 279warning: trait `aliases_pub::PrivTr` is more private than the item `aliases_pub::f3` 280 --> $DIR/private-in-public.rs:106:5 281 | 282LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 283 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_pub::f3` is reachable at visibility `pub(crate)` 284 | 285note: but trait `aliases_pub::PrivTr` is only usable at visibility `pub(self)` 286 --> $DIR/private-in-public.rs:100:5 287 | 288LL | trait PrivTr { 289 | ^^^^^^^^^^^^ 290 291warning: type `aliases_pub::Priv` is more private than the item `aliases_pub::f3` 292 --> $DIR/private-in-public.rs:106:5 293 | 294LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 295 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_pub::f3` is reachable at visibility `pub(crate)` 296 | 297note: but type `aliases_pub::Priv` is only usable at visibility `pub(self)` 298 --> $DIR/private-in-public.rs:87:5 299 | 300LL | struct Priv; 301 | ^^^^^^^^^^^ 302 303warning: type `Priv1` is more private than the item `aliases_priv::f1` 304 --> $DIR/private-in-public.rs:133:5 305 | 306LL | pub fn f1(arg: PrivUseAlias) {} 307 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f1` is reachable at visibility `pub(crate)` 308 | 309note: but type `Priv1` is only usable at visibility `pub(self)` 310 --> $DIR/private-in-public.rs:118:5 311 | 312LL | struct Priv1; 313 | ^^^^^^^^^^^^ 314 315warning: type `Priv2` is more private than the item `aliases_priv::f2` 316 --> $DIR/private-in-public.rs:134:5 317 | 318LL | pub fn f2(arg: PrivAlias) {} 319 | ^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f2` is reachable at visibility `pub(crate)` 320 | 321note: but type `Priv2` is only usable at visibility `pub(self)` 322 --> $DIR/private-in-public.rs:119:5 323 | 324LL | struct Priv2; 325 | ^^^^^^^^^^^^ 326 327warning: trait `aliases_priv::PrivTr` is more private than the item `aliases_priv::f3` 328 --> $DIR/private-in-public.rs:135:5 329 | 330LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 331 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)` 332 | 333note: but trait `aliases_priv::PrivTr` is only usable at visibility `pub(self)` 334 --> $DIR/private-in-public.rs:128:5 335 | 336LL | trait PrivTr { 337 | ^^^^^^^^^^^^ 338 339warning: type `aliases_priv::Priv` is more private than the item `aliases_priv::f3` 340 --> $DIR/private-in-public.rs:135:5 341 | 342LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {} 343 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)` 344 | 345note: but type `aliases_priv::Priv` is only usable at visibility `pub(self)` 346 --> $DIR/private-in-public.rs:116:5 347 | 348LL | struct Priv; 349 | ^^^^^^^^^^^ 350 351warning: type `aliases_params::Priv` is more private than the item `aliases_params::f2` 352 --> $DIR/private-in-public.rs:145:5 353 | 354LL | pub fn f2(arg: PrivAliasGeneric) {} 355 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_params::f2` is reachable at visibility `pub(crate)` 356 | 357note: but type `aliases_params::Priv` is only usable at visibility `pub(self)` 358 --> $DIR/private-in-public.rs:141:5 359 | 360LL | struct Priv; 361 | ^^^^^^^^^^^ 362 363warning: type `aliases_params::Priv` is more private than the item `aliases_params::f3` 364 --> $DIR/private-in-public.rs:147:5 365 | 366LL | pub fn f3(arg: Result<u8>) {} 367 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_params::f3` is reachable at visibility `pub(crate)` 368 | 369note: but type `aliases_params::Priv` is only usable at visibility `pub(self)` 370 --> $DIR/private-in-public.rs:141:5 371 | 372LL | struct Priv; 373 | ^^^^^^^^^^^ 374 375warning: 31 warnings emitted 376