2021-04-18 16:43:43 +02:00
|
|
|
// revisions: full min
|
2021-07-08 22:57:10 +02:00
|
|
|
//[full] check-pass
|
2021-08-27 18:04:57 +02:00
|
|
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
2021-10-23 16:57:49 +01:00
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2021-04-18 13:57:22 +02:00
|
|
|
|
|
|
|
struct Foo<const N: usize, const M: usize = { N + 1 }>;
|
2021-07-08 22:57:10 +02:00
|
|
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
2021-04-18 13:57:22 +02:00
|
|
|
|
|
|
|
struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
|
2021-07-08 22:57:10 +02:00
|
|
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
2021-04-18 13:57:22 +02:00
|
|
|
|
|
|
|
fn main() {}
|