]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/nested-type.min.stderr
Add revisions to const generic type-dependent UI tests.
[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:7: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    = note: more complex types are supported with `#[feature(const_generics)]`
16
17 error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
18   --> $DIR/nested-type.rs:16:5
19    |
20 LL |     Foo::<17>::value()
21    |     ^^^^^^^^^^^^^^^^^^
22
23 error[E0080]: evaluation of constant value failed
24   --> $DIR/nested-type.rs:16:5
25    |
26 LL |     Foo::<17>::value()
27    |     ^^^^^^^^^^^^^^^^^^ calling non-const function `Foo::{{constant}}#0::Foo::<17_usize>::value`
28
29 error: aborting due to 3 previous errors
30
31 Some errors have detailed explanations: E0015, E0080.
32 For more information about an error, try `rustc --explain E0015`.