Update stack_overflow
This commit is contained in:
parent
f6214968c8
commit
3fba081487
1 changed files with 6 additions and 3 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue