blob: 8a1e57e11ddc3db2112afc1e5beefe8ec12ca28c [file]
error[E0594]: cannot assign to `t.v`, which is behind a `&` reference
--> $DIR/suggest-mut-method-for-loop-closure.rs:15:13
|
LL | for mut t in buzz.values() {
| ------------- this iterator yields `&` references
...
LL | t.v += 1;
| ^^^^^^^^ `t` is a `&` reference, so it cannot be written to
|
help: use mutable method
|
LL | for mut t in buzz.values_mut() {
| ++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0594`.