]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-missing-mut.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closures-infer-fnmut-missing-mut.stderr
index eb398628846ddbed19b8109fee523b96eaa5c6f4..27d23e3fa044bb5f261478c435f44f0971da4639 100644 (file)
@@ -2,7 +2,9 @@ error[E0596]: cannot borrow `tick` as mutable, as it is not declared as mutable
   --> $DIR/unboxed-closures-infer-fnmut-missing-mut.rs:7:5
    |
 LL |     let tick = || counter += 1;
-   |         ---- help: consider changing this to be mutable: `mut tick`
+   |         ----      ------- calling `tick` requires mutable binding due to mutable borrow of `counter`
+   |         |
+   |         help: consider changing this to be mutable: `mut tick`
 LL |     tick();
    |     ^^^^ cannot borrow as mutable