mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-17 02:54:26 +00:00
13 lines
426 B
Rust
13 lines
426 B
Rust
// revisions: full min
|
|
//[full] check-pass
|
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
struct Foo<const N: usize, const M: usize = { N + 1 }>;
|
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
|
|
|
struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
|
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
|
|
|
fn main() {}
|