Update stack_overflow

This commit is contained in:
Yifan Wu 2022-11-29 11:12:29 +08:00
parent 872008472d
commit 98e87823b7

View File

@ -4,9 +4,12 @@
#[macro_use]
extern crate user_lib;
fn f(d: usize) {
println!("d = {}", d);
f(d + 1);
#[allow(unconditional_recursion)]
fn f(depth: usize) {
if depth % 10 == 0 {
println!("depth = {}", depth);
}
f(depth + 1);
}
#[no_mangle]