rust/tests/ui/const-generics/generic_const_exprs/const-block-is-poly.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
244 B
Rust
Raw Permalink Normal View History

2024-04-19 10:54:41 -05:00
#![feature(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>();
}