rust/tests/compile-fail/stack_limit.rs

27 lines
337 B
Rust
Raw Normal View History

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