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