error[E0594]: cannot assign to captured outer variable in an `FnMut` closure --> $DIR/issue-46023.rs:18:9 | LL | let x = 0; | - help: consider making `x` mutable: `mut x` ... LL | x = 1; | ^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0594`.