fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
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 || { 8LL | | x += 1; 9 | | ^^^^^^ cannot assign 10LL | | x 11LL | | } 12 | |_____- in this closure 13 14error: aborting due to previous error 15 16For more information about this error, try `rustc --explain E0594`.