blob: c10db84ea6ecc1c1fc36e22907cf0c2f2c70302c [file] [log] [blame]
error: generic parameters may not be used in const operations
--> $DIR/issue-76701-ty-param-in-const.rs:6:46
|
LL | fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
error: generic parameters may not be used in const operations
--> $DIR/issue-76701-ty-param-in-const.rs:12:42
|
LL | fn const_param<const N: usize>() -> [u8; N + 1] {
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
error: aborting due to 2 previous errors