rust/tests/compile-fail/stack_limit.rs
Ralf Jung 1241938f97 test suite now also passes on MIR-libstd
Also enable some tests that were disabled for no apparant reason.
(The comment in zst.rs was wrong, the test was disabled also for miri execution.)
Delete env_args test as the args can actually be queried with MIR-libstd (currently, they are always empty)
2017-05-30 10:41:38 -07:00

27 lines
337 B
Rust

#![feature(custom_attribute, attr_literals)]
#![miri(stack_limit=16)]
fn bar() {
foo();
}
fn foo() {
cake(); //~ ERROR reached the configured maximum number of stack frames
}
fn cake() {
flubber(3);
}
fn flubber(i: u32) {
if i > 0 {
flubber(i-1);
} else {
bar();
}
}
fn main() {
bar();
}