mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-22 01:16:26 +04:00
Update stack_overflow
This commit is contained in:
parent
414dbb3a09
commit
3042f74611
@ -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…
Reference in New Issue
Block a user