diff options
Diffstat (limited to 'tests/ui/limits/huge-array.rs')
-rw-r--r-- | tests/ui/limits/huge-array.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/limits/huge-array.rs b/tests/ui/limits/huge-array.rs new file mode 100644 index 000000000..3070801f8 --- /dev/null +++ b/tests/ui/limits/huge-array.rs @@ -0,0 +1,15 @@ +// FIXME https://github.com/rust-lang/rust/issues/59774 + +// build-fail +// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" +// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" + +fn generic<T: Copy>(t: T) { + let s: [T; 1518600000] = [t; 1518600000]; + //~^ ERROR values of the type `[[u8; 1518599999]; 1518600000]` are too big +} + +fn main() { + let x: [u8; 1518599999] = [0; 1518599999]; + generic::<[u8; 1518599999]>(x); +} |