]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr
Auto merge of #54265 - arielb1:civilize-proc-macros, r=alexcrichton
[rust.git] / src / test / ui / unboxed-closures / unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr
1 error[E0595]: closure cannot assign to immutable local variable `tick1`
2   --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:26:17
3    |
4 LL |     let tick1 = || {
5    |         ----- help: make this binding mutable: `mut tick1`
6 ...
7 LL |     let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1`
8    |                 ^^ cannot borrow mutably
9
10 error[E0596]: cannot borrow immutable local variable `tick2` as mutable
11   --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:30:5
12    |
13 LL |     let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1`
14    |         ----- help: make this binding mutable: `mut tick2`
15 ...
16 LL |     tick2(); //~ ERROR cannot borrow
17    |     ^^^^^ cannot borrow mutably
18
19 error: aborting due to 2 previous errors
20
21 Some errors occurred: E0595, E0596.
22 For more information about an error, try `rustc --explain E0595`.