rust/tests/ui/consts/issue-66342.rs

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

13 lines
231 B
Rust
Raw Normal View History

// check-pass
2019-11-15 01:48:42 +00:00
// only-x86_64
2019-11-14 11:17:41 +00:00
// Checks that the compiler does not actually try to allocate 4 TB during compilation and OOM crash.
fn foo() -> [u8; 4 * 1024 * 1024 * 1024 * 1024] {
unimplemented!()
}
fn main() {
foo();
}