|
|
|
|
|
by fulafel
3122 days ago
|
|
This example is just infinite recursion. You will get a similar result in, say, Python. Maybe the author wanted to say that Rust (currently) doesn't perform an optimization called tail call elimination that would make this program consume zero stack, which would make it hang instead of erroring out. Some languages (like Scheme) are specified to optimize tail calls, so you can rely on this behaviour there. |
|