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