]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/consts/large_const_alloc.rs
Test memory exhaustion in const evaluation
[rust.git] / src / test / ui / consts / large_const_alloc.rs
index 2771af92d30d1e68e1f0cf1d49e56ed5217d768e..54abaab2247307d47bbd82a7512d5b0b2b9d1f9d 100644 (file)
@@ -7,6 +7,12 @@
     //~^ ERROR evaluation of constant value failed
 };
 
+static FOO2: () = {
+    let x = [0_u8; (1 << 47) - 1];
+    //~^ ERROR could not evaluate static initializer
+};
+
 fn main() {
     let _ = FOO;
+    let _ = FOO2;
 }