Add test for #75158

Closes #75158
This commit is contained in:
Ömer Sinan Ağacan 2021-01-28 10:27:48 +03:00
parent 6a388dcfbb
commit b46fe85081
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,16 @@
//~ ERROR
// build-fail
// ignore-32bit
struct S<T> {
x: [T; !0],
}
pub fn f() -> usize {
std::mem::size_of::<S<u8>>()
}
fn main() {
let x = f();
}

View file

@ -0,0 +1,4 @@
error: values of the type `[u8; 18446744073709551615]` are too big for the current architecture
error: aborting due to previous error