1 This error indicates that a variable usage inside an inner function is invalid
2 because the variable comes from a dynamic environment. Inner functions do not
3 have access to their containing environment.
5 Erroneous code example:
11 y // error: can't capture dynamic environment in a fn item; use the
12 // || { ... } closure form instead.
17 Functions do not capture local variables. To fix this error, you can replace the
18 function with a closure:
29 or replace the captured variable with a constant or a static item:
33 static mut X: u32 = 4;