rust/tests/ui/const-generics/generic_const_exprs/abstract-consts-as-cast-5.s...

14 lines
423 B
Plaintext

error: unconstrained generic constant
--> $DIR/abstract-consts-as-cast-5.rs:5:11
|
LL | bar::<{ N as usize as usize }>();
| ^^^^^^^^^^^^^^^^^^^^^^^
|
help: try adding a `where` bound
|
LL | fn foo<const N: u8>(a: [(); N as usize]) where [(); { N as usize as usize }]: {
| ++++++++++++++++++++++++++++++++++++
error: aborting due to 1 previous error