1 warning: private type `fn(u8) -> u8 {my_const_fn}` in public interface (error E0446)
2 --> $DIR/eval-privacy.rs:12:1
4 LL | / impl<const U: u8> Trait for Const<U>
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>
17 warning: private type `fn(u8) -> u8 {my_const_fn}` in public interface (error E0446)
18 --> $DIR/eval-privacy.rs:12:1
20 LL | / impl<const U: u8> Trait for Const<U>
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>
32 error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface
33 --> $DIR/eval-privacy.rs:21:5
35 LL | type AssocTy = Const<{ my_const_fn(U) }>;
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
38 LL | const fn my_const_fn(val: u8) -> u8 {
39 | ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
41 error: aborting due to previous error; 2 warnings emitted
43 For more information about this error, try `rustc --explain E0446`.