]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | error[E0594]: cannot assign to `t.v` which is behind a `&` reference |
2 | --> $DIR/suggest-mut-method-for-loop.rs:14:9 | |
3 | | | |
4 | LL | for mut t in buzz.values() { | |
5 | | ------------- | |
6 | | | | | |
7 | | | help: use mutable method: `values_mut()` | |
8 | | this iterator yields `&` references | |
9 | ... | |
10 | LL | t.v += 1; | |
11 | | ^^^^^^^^ `t` is a `&` reference, so the data it refers to cannot be written | |
12 | ||
13 | error: aborting due to previous error | |
14 | ||
15 | For more information about this error, try `rustc --explain E0594`. |