rust/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.rs
2023-01-16 20:09:31 +00:00

12 lines
258 B
Rust

#![feature(inline_const, generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete
fn foo<T>() {
let _ = [0u8; const { std::mem::size_of::<T>() }];
//~^ ERROR: overly complex generic constant
}
fn main() {
foo::<i32>();
}