blob: bb2ffcd21b0969ed542c62a4bcb4bc3c25e52aaa [file] [log] [blame]
error[E0595]: closure cannot assign to immutable local variable `tick1`
--> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:26:17
|
LL | let tick1 = || {
| ----- consider changing this to `mut tick1`
...
LL | let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1`
| ^^ cannot borrow mutably
error[E0596]: cannot borrow immutable local variable `tick2` as mutable
--> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:30:5
|
LL | let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1`
| ----- consider changing this to `mut tick2`
...
LL | tick2(); //~ ERROR cannot borrow
| ^^^^^ cannot borrow mutably
error: aborting due to 2 previous errors
Some errors occurred: E0595, E0596.
For more information about an error, try `rustc --explain E0595`.