mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
11 lines
190 B
Rust
11 lines
190 B
Rust
#![feature(generic_const_exprs)]
|
|
|
|
fn foo<T>() {
|
|
let _ = [0u8; { const { std::mem::size_of::<T>() } }];
|
|
//~^ ERROR: overly complex generic constant
|
|
}
|
|
|
|
fn main() {
|
|
foo::<i32>();
|
|
}
|