2019-05-05 06:02:32 -05:00
|
|
|
error[E0507]: cannot move out of a shared reference
|
2020-08-30 13:59:56 -05:00
|
|
|
--> $DIR/for.rs:6:23
|
2019-04-15 14:54:18 -05:00
|
|
|
|
|
|
|
|
LL | for (n, mut m) in &tups {
|
2019-05-05 06:02:32 -05:00
|
|
|
| ----- ^^^^^
|
2019-04-15 14:54:18 -05:00
|
|
|
| |
|
|
|
|
| data moved here
|
2019-05-05 06:02:32 -05:00
|
|
|
| move occurs because `m` has type `Foo`, which does not implement the `Copy` trait
|
2022-12-08 19:14:56 -06:00
|
|
|
|
|
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | for (n, ref mut m) in &tups {
|
|
|
|
| +++
|
2019-04-15 14:54:18 -05:00
|
|
|
|
2020-01-18 19:47:01 -06:00
|
|
|
error: aborting due to previous error
|
2017-10-06 15:30:23 -05:00
|
|
|
|
2020-01-18 19:47:01 -06:00
|
|
|
For more information about this error, try `rustc --explain E0507`.
|