1 error[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
4 LL | fn bar() -> impl Fn() -> usize {
5 | --- ------------------ change this to return `FnMut` instead of `Fn`
9 | | ^^^^^^ cannot assign
12 | |_____- in this closure
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0594`.