Skip to main content

with_stack_growth

Function with_stack_growth 

Source
pub fn with_stack_growth<T>(f: impl FnOnce() -> T) -> T
Expand description

Run f, growing the stack on demand when the remaining stack is low.

Call this at the entry of every function that recurses once per expression-tree level. The check is a cheap stack-pointer comparison in the common (no-growth) case.