1 A variable used inside an inner function comes from a dynamic environment.
3 Erroneous code example:
9 y // error: can't capture dynamic environment in a fn item; use the
10 // || { ... } closure form instead.
15 Inner functions do not have access to their containing environment. To fix this
16 error, you can replace the function with a closure:
27 Or replace the captured variable with a constant or a static item:
31 static mut X: u32 = 4;