rust/tests/compile-fail/oom.rs
Oliver Schneider ad053d66fe
change the block and stmt position after a function call returns
previously we moved to the target block *before* calling a function, so when inspecting
the stack, it appeared as if we were in the first statement of the next block.
2016-09-07 12:48:29 +02:00

12 lines
235 B
Rust

#![feature(custom_attribute, attr_literals)]
#![miri(memory_size=0)]
fn bar() {
let x = 5;
assert_eq!(x, 6);
}
fn main() {
bar(); //~ ERROR tried to allocate 4 more bytes, but only 0 bytes are free of the 0 byte memory
}