rust/tests/compile-fail/oom.rs
Scott Olson 49e6c57ef9 Do not pre-allocate local variables.
Thanks to the `Value` locals refactoring, now primitive locals (ints,
floats, chars, bools, and the like) will not require `Allocation`s at
all, and locals that are never initialized at all because of conditional
control flow won't be wasting memory.
2016-10-15 23:31:42 -06:00

8 lines
201 B
Rust

#![feature(custom_attribute, attr_literals)]
#![miri(memory_size=0)]
fn main() {
let _x = [42; 10];
//~^ERROR tried to allocate 40 more bytes, but only 0 bytes are free of the 0 byte memory
}