]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | warning: private type `fn(u8) -> u8 {my_const_fn}` in public interface (error E0446) |
2 | --> $DIR/eval-privacy.rs:12:1 | |
3 | | | |
4 | LL | / impl<const U: u8> Trait for Const<U> | |
5 | LL | | | |
6 | LL | | | |
7 | LL | | | |
8 | ... | | |
9 | LL | | } | |
10 | LL | | } | |
11 | | |_^ | |
12 | | | |
13 | = note: `#[warn(private_in_public)]` on by default | |
14 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
15 | = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> | |
16 | ||
17 | warning: private type `fn(u8) -> u8 {my_const_fn}` in public interface (error E0446) | |
18 | --> $DIR/eval-privacy.rs:12:1 | |
19 | | | |
20 | LL | / impl<const U: u8> Trait for Const<U> | |
21 | LL | | | |
22 | LL | | | |
23 | LL | | | |
24 | ... | | |
25 | LL | | } | |
26 | LL | | } | |
27 | | |_^ | |
28 | | | |
29 | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | |
30 | = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> | |
31 | ||
32 | error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface | |
33 | --> $DIR/eval-privacy.rs:21:5 | |
34 | | | |
35 | LL | type AssocTy = Const<{ my_const_fn(U) }>; | |
36 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type | |
37 | ... | |
38 | LL | const fn my_const_fn(val: u8) -> u8 { | |
39 | | ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private | |
40 | ||
41 | error: aborting due to previous error; 2 warnings emitted | |
42 | ||
43 | For more information about this error, try `rustc --explain E0446`. |