fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
994 B28 linesraw
1error[E0596]: cannot borrow `tick1` as mutable, as it is not declared as mutable
2  --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:16:9
3   |
4LL |     let tick1 = || {
5   |         ----- help: consider changing this to be mutable: `mut tick1`
6LL |         counter += 1;
7   |         ------- calling `tick1` requires mutable binding due to mutable borrow of `counter`
8...
9LL |         tick1();
10   |         ^^^^^ cannot borrow as mutable
11
12error[E0596]: cannot borrow `tick2` as mutable, as it is not declared as mutable
13  --> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:19:5
14   |
15LL |         tick1();
16   |         ----- calling `tick2` requires mutable binding due to mutable borrow of `tick1`
17...
18LL |     tick2();
19   |     ^^^^^ cannot borrow as mutable
20   |
21help: consider changing this to be mutable
22   |
23LL |     let mut tick2 = || {
24   |         +++
25
26error: aborting due to 2 previous errors
27
28For more information about this error, try `rustc --explain E0596`.