]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/const-param-type-depends-on-const-param.min.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / const-generics / const-param-type-depends-on-const-param.min.stderr
CommitLineData
3dfed10e 1error[E0770]: the type of const parameters must not depend on other generic parameters
5869c6ff 2 --> $DIR/const-param-type-depends-on-const-param.rs:11:52
3dfed10e
XL
3 |
4LL | pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
5 | ^ the type must not depend on the parameter `N`
6
7error[E0770]: the type of const parameters must not depend on other generic parameters
5869c6ff 8 --> $DIR/const-param-type-depends-on-const-param.rs:15:40
3dfed10e
XL
9 |
10LL | pub struct SelfDependent<const N: [u8; N]>;
11 | ^ the type must not depend on the parameter `N`
12
13error: `[u8; _]` is forbidden as the type of a const generic parameter
5869c6ff 14 --> $DIR/const-param-type-depends-on-const-param.rs:11:47
3dfed10e
XL
15 |
16LL | pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
17 | ^^^^^^^
18 |
19 = note: the only supported types are integers, `bool` and `char`
5869c6ff 20 = help: more complex types are supported with `#![feature(const_generics)]`
3dfed10e
XL
21
22error: `[u8; _]` is forbidden as the type of a const generic parameter
5869c6ff 23 --> $DIR/const-param-type-depends-on-const-param.rs:15:35
3dfed10e
XL
24 |
25LL | pub struct SelfDependent<const N: [u8; N]>;
26 | ^^^^^^^
27 |
28 = note: the only supported types are integers, `bool` and `char`
5869c6ff 29 = help: more complex types are supported with `#![feature(const_generics)]`
3dfed10e
XL
30
31error: aborting due to 4 previous errors
32
33For more information about this error, try `rustc --explain E0770`.