1 error[E0594]: cannot assign to `n`, as it is not declared as mutable
2 --> $DIR/unboxed-closures-mutate-upvar.rs:15:9
5 | - help: consider changing this to be mutable: `mut n`
6 LL | let mut f = to_fn_mut(|| {
10 error[E0594]: cannot assign to `n`, as it is not declared as mutable
11 --> $DIR/unboxed-closures-mutate-upvar.rs:32:9
14 | - help: consider changing this to be mutable: `mut n`
17 | ^^^^^^ cannot assign
19 error[E0594]: cannot assign to `n`, as it is not declared as mutable
20 --> $DIR/unboxed-closures-mutate-upvar.rs:46:9
23 | - help: consider changing this to be mutable: `mut n`
24 LL | let mut f = to_fn(move || {
26 | ^^^^^^ cannot assign
28 error[E0594]: cannot assign to `n`, as it is a captured variable in a `Fn` closure
29 --> $DIR/unboxed-closures-mutate-upvar.rs:53:9
31 LL | fn to_fn<A:std::marker::Tuple,F:Fn<A>>(f: F) -> F { f }
32 | - change this to accept `FnMut` instead of `Fn`
34 LL | let mut f = to_fn(move || {
35 | ----- ------- in this closure
37 | expects `Fn` instead of `FnMut`
39 | ^^^^^^ cannot assign
41 error: aborting due to 4 previous errors
43 For more information about this error, try `rustc --explain E0594`.