2021-04-18 07:31:00 -05:00
|
|
|
error: generic parameters may not be used in const operations
|
2021-10-23 10:57:49 -05:00
|
|
|
--> $DIR/complex-generic-default-expr.rs:6:47
|
2021-04-18 07:31:00 -05:00
|
|
|
|
|
|
|
|
LL | struct Foo<const N: usize, const M: usize = { N + 1 }>;
|
|
|
|
| ^ cannot perform const operation using `N`
|
|
|
|
|
|
|
|
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
|
2021-08-27 11:04:57 -05:00
|
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
2021-04-18 07:31:00 -05:00
|
|
|
|
|
|
|
error: generic parameters may not be used in const operations
|
2021-10-23 10:57:49 -05:00
|
|
|
--> $DIR/complex-generic-default-expr.rs:9:62
|
2021-04-18 07:31:00 -05:00
|
|
|
|
|
|
|
|
LL | struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
|
|
|
|
| ^ cannot perform const operation using `T`
|
|
|
|
|
|
|
|
|
= note: type parameters may not be used in const expressions
|
2021-08-27 11:04:57 -05:00
|
|
|
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
|
2021-04-18 07:31:00 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|