]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/const_evaluatable_checked/eval-privacy.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / const-generics / const_evaluatable_checked / eval-privacy.stderr
CommitLineData
5869c6ff
XL
1warning: private type `fn(u8) -> u8 {my_const_fn}` in public interface (error E0446)
2 --> $DIR/eval-privacy.rs:12:1
3 |
4LL | / impl<const U: u8> Trait for Const<U>
5LL | |
6LL | |
7LL | |
8... |
9LL | | }
10LL | | }
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
17warning: private type `fn(u8) -> u8 {my_const_fn}` in public interface (error E0446)
18 --> $DIR/eval-privacy.rs:12:1
19 |
20LL | / impl<const U: u8> Trait for Const<U>
21LL | |
22LL | |
23LL | |
24... |
25LL | | }
26LL | | }
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
32error[E0446]: private type `fn(u8) -> u8 {my_const_fn}` in public interface
33 --> $DIR/eval-privacy.rs:21:5
34 |
35LL | type AssocTy = Const<{ my_const_fn(U) }>;
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
37...
38LL | const fn my_const_fn(val: u8) -> u8 {
39 | ----------------------------------- `fn(u8) -> u8 {my_const_fn}` declared as private
40
41error: aborting due to previous error; 2 warnings emitted
42
43For more information about this error, try `rustc --explain E0446`.