]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0446]: private type `Priv` in public interface |
f035d41b | 2 | --> $DIR/private-in-public-assoc-ty.rs:17:9 |
74b04a01 XL |
3 | | |
4 | LL | struct Priv; | |
1b1a35ee | 5 | | - `Priv` declared as private |
74b04a01 XL |
6 | ... |
7 | LL | type A = Priv; | |
8 | | ^^^^^^^^^^^^^^ can't leak private type | |
9 | ||
1b1a35ee | 10 | warning: private trait `PrivTr` in public interface (error E0445) |
f035d41b | 11 | --> $DIR/private-in-public-assoc-ty.rs:23:5 |
b7449926 XL |
12 | | |
13 | LL | / pub trait PubTr { | |
532ac7d7 XL |
14 | LL | | |
15 | LL | | | |
16 | LL | | | |
b7449926 | 17 | ... | |
9fa01778 | 18 | LL | | fn infer_exist() -> Self::Exist; |
b7449926 XL |
19 | LL | | } |
20 | | |_____^ | |
21 | | | |
416331ca | 22 | = note: `#[warn(private_in_public)]` on by default |
b7449926 XL |
23 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! |
24 | = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> | |
25 | ||
1b1a35ee | 26 | warning: private type `Priv` in public interface (error E0446) |
f035d41b | 27 | --> $DIR/private-in-public-assoc-ty.rs:23:5 |
b7449926 XL |
28 | | |
29 | LL | / pub trait PubTr { | |
532ac7d7 XL |
30 | LL | | |
31 | LL | | | |
32 | LL | | | |
b7449926 | 33 | ... | |
9fa01778 | 34 | LL | | fn infer_exist() -> Self::Exist; |
b7449926 XL |
35 | LL | | } |
36 | | |_____^ | |
37 | | | |
38 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
39 | = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> | |
40 | ||
1b1a35ee | 41 | warning: private type `Priv` in public interface (error E0446) |
f035d41b | 42 | --> $DIR/private-in-public-assoc-ty.rs:23:5 |
dfeec247 XL |
43 | | |
44 | LL | / pub trait PubTr { | |
45 | LL | | | |
46 | LL | | | |
47 | LL | | | |
48 | ... | | |
49 | LL | | fn infer_exist() -> Self::Exist; | |
50 | LL | | } | |
51 | | |_____^ | |
52 | | | |
53 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
54 | = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> | |
55 | ||
1b1a35ee | 56 | error[E0446]: private type `Priv` in public interface |
f035d41b | 57 | --> $DIR/private-in-public-assoc-ty.rs:34:9 |
b7449926 XL |
58 | | |
59 | LL | struct Priv; | |
1b1a35ee | 60 | | - `Priv` declared as private |
b7449926 XL |
61 | ... |
62 | LL | type Alias4 = Priv; | |
63 | | ^^^^^^^^^^^^^^^^^^^ can't leak private type | |
64 | ||
1b1a35ee | 65 | error[E0446]: private type `Priv` in public interface |
f035d41b | 66 | --> $DIR/private-in-public-assoc-ty.rs:41:9 |
b7449926 XL |
67 | | |
68 | LL | struct Priv; | |
1b1a35ee | 69 | | - `Priv` declared as private |
b7449926 XL |
70 | ... |
71 | LL | type Alias1 = Priv; | |
72 | | ^^^^^^^^^^^^^^^^^^^ can't leak private type | |
73 | ||
1b1a35ee | 74 | error[E0445]: private trait `PrivTr` in public interface |
f035d41b | 75 | --> $DIR/private-in-public-assoc-ty.rs:44:9 |
dfeec247 XL |
76 | | |
77 | LL | trait PrivTr {} | |
1b1a35ee | 78 | | - `PrivTr` declared as private |
dfeec247 XL |
79 | ... |
80 | LL | type Exist = impl PrivTr; | |
81 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait | |
82 | ||
f035d41b | 83 | error: aborting due to 4 previous errors; 3 warnings emitted |
b7449926 | 84 | |
48663c56 | 85 | Some errors have detailed explanations: E0445, E0446. |
9fa01778 | 86 | For more information about an error, try `rustc --explain E0445`. |