]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/nested-type.min.stderr
Move generic error message to separate branches
[rust.git] / src / test / ui / const-generics / nested-type.min.stderr
1 error: `[u8; _]` is forbidden as the type of a const generic parameter
2   --> $DIR/nested-type.rs:6:21
3    |
4 LL |   struct Foo<const N: [u8; {
5    |  _____________________^
6 LL | |     struct Foo<const N: usize>;
7 LL | |
8 LL | |     impl<const N: usize> Foo<N> {
9 ...  |
10 LL | |
11 LL | | }]>;
12    | |__^
13    |
14    = note: the only supported types are integers, `bool` and `char`
15    = help: more complex types are supported with `#![feature(adt_const_params)]`
16
17 error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
18   --> $DIR/nested-type.rs:15:5
19    |
20 LL |     Foo::<17>::value()
21    |     ^^^^^^^^^^^^^^^^^^
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0015`.