blob: 7eb71346ae9c800b6c025619e8252aa43c1c782d (
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
|
warning: private type `PrivTy` in public interface (error E0446)
--> $DIR/where-priv-type.rs:19:1
|
LL | pub struct S
| ^^^^^^^^^^^^
|
= note: `#[warn(private_in_public)]` on by default
= 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 `PrivTy` in public interface (error E0446)
--> $DIR/where-priv-type.rs:27:1
|
LL | pub enum E
| ^^^^^^^^^^
|
= 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 `PrivTy` in public interface (error E0446)
--> $DIR/where-priv-type.rs:35:1
|
LL | / pub fn f()
LL | |
LL | |
LL | | where
LL | | PrivTy:
| |___________^
|
= 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 `PrivTy` in public interface
--> $DIR/where-priv-type.rs:43:1
|
LL | struct PrivTy;
| ------------- `PrivTy` declared as private
...
LL | impl S
| ^^^^^^ can't leak private type
warning: private type `PrivTy` in public interface (error E0446)
--> $DIR/where-priv-type.rs:48:5
|
LL | / pub fn f()
LL | |
LL | |
LL | | where
LL | | PrivTy:
| |_______________^
|
= 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 `fn(u8) -> u8 {my_const_fn}` in public interface
--> $DIR/where-priv-type.rs:80:5
|
LL | type AssocTy = Const<{ my_const_fn(U) }>;
| ^^^^^^^^^^^^ can't leak private type
...
LL | const fn my_const_fn(val: u8) -> u8 {
| ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
error: aborting due to 2 previous errors; 4 warnings emitted
For more information about this error, try `rustc --explain E0446`.
|