1
Fork 0

Add note to use nightly when using expr in const generics

This commit is contained in:
mendess 2020-11-24 09:35:08 +00:00
parent d9a105fdd4
commit b7593e5070
22 changed files with 41 additions and 0 deletions

View file

@ -5,6 +5,7 @@ LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
= note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this
error: generic parameters may not be used in const operations
--> $DIR/array-size-in-generic-struct-param.rs:20:15
@ -13,6 +14,7 @@ LL | arr: [u8; CFG.arr_size],
| ^^^ cannot perform const operation using `CFG`
|
= help: const parameters may only be used as standalone arguments, i.e. `CFG`
= note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this
error: `Config` is forbidden as the type of a const generic parameter
--> $DIR/array-size-in-generic-struct-param.rs:18:21