fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0594]: cannot assign to `x`, as it is a captured variable in a `Fn` closure 2 --> $DIR/borrow-immutable-upvar-mutation-impl-trait.rs:11:9 3 | 4LL | fn bar() -> impl Fn() -> usize { 5 | --- ------------------ change this to return `FnMut` instead of `Fn` 6LL | let mut x = 0; 7LL | move || { 8 | ------- in this closure 9LL | x += 1; 10 | ^^^^^^ cannot assign 11 12error: aborting due to previous error 13 14For more information about this error, try `rustc --explain E0594`.