blob: e097cbe9dd6d1d3187c09a80b1eb78271f3fa425 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#![feature(inline_const)]
fn foo<T>() {
let _ = [0u8; const { std::mem::size_of::<T>() }];
//~^ ERROR: constant expression depends on a generic parameter
}
fn main() {
foo::<i32>();
}
|