blob: a59027d81d286fc9b2010daa45ce00a8b9d55715 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
error[E0446]: private type `Priv` in public interface
--> $DIR/private-in-public-assoc-ty.rs:17:9
|
LL | struct Priv;
| ----------- `Priv` declared as private
...
LL | type A = Priv;
| ^^^^^^ can't leak private type
warning: private trait `PrivTr` in public interface (error E0445)
--> $DIR/private-in-public-assoc-ty.rs:24:9
|
LL | type Alias1: PrivTr;
| ^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
= note: `#[warn(private_in_public)]` on by default
warning: private type `Priv` in public interface (error E0446)
--> $DIR/private-in-public-assoc-ty.rs:27:9
|
LL | type Alias2: PubTrAux1<Priv> = u8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
warning: private type `Priv` in public interface (error E0446)
--> $DIR/private-in-public-assoc-ty.rs:30:9
|
LL | type Alias3: PubTrAux2<A = Priv> = u8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
error[E0446]: private type `Priv` in public interface
--> $DIR/private-in-public-assoc-ty.rs:34:9
|
LL | struct Priv;
| ----------- `Priv` declared as private
...
LL | type Alias4 = Priv;
| ^^^^^^^^^^^ can't leak private type
error[E0446]: private type `Priv` in public interface
--> $DIR/private-in-public-assoc-ty.rs:41:9
|
LL | struct Priv;
| ----------- `Priv` declared as private
...
LL | type Alias1 = Priv;
| ^^^^^^^^^^^ can't leak private type
error[E0445]: private trait `PrivTr` in public interface
--> $DIR/private-in-public-assoc-ty.rs:44:9
|
LL | trait PrivTr {}
| ------------ `PrivTr` declared as private
...
LL | type Exist = impl PrivTr;
| ^^^^^^^^^^ can't leak private trait
error: aborting due to 4 previous errors; 3 warnings emitted
Some errors have detailed explanations: E0445, E0446.
For more information about an error, try `rustc --explain E0445`.
|