2021-09-07 07:24:04 -05:00
|
|
|
error: unconstrained generic constant
|
|
|
|
--> $DIR/abstract-consts-as-cast-5.rs:5:11
|
|
|
|
|
|
|
|
|
LL | bar::<{ N as usize as usize }>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-03-20 19:03:59 -05:00
|
|
|
help: try adding a `where` bound
|
|
|
|
|
|
|
|
|
LL | fn foo<const N: u8>(a: [(); N as usize]) where [(); { N as usize as usize }]: {
|
|
|
|
| ++++++++++++++++++++++++++++++++++++
|
2021-09-07 07:24:04 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-09-07 07:24:04 -05:00
|
|
|
|