2017-10-06 15:30:23 -05:00
|
|
|
error[E0009]: cannot bind by-move and by-ref in the same pattern
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/for.rs:6:13
|
2017-10-06 15:30:23 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | for (n, mut m) in &tups {
|
2017-10-06 15:30:23 -05:00
|
|
|
| - ^^^^^ by-move pattern here
|
|
|
|
| |
|
|
|
|
| both by-ref and by-move used
|
|
|
|
|
2019-05-05 06:02:32 -05:00
|
|
|
error[E0507]: cannot move out of a shared reference
|
2019-04-15 14:54:18 -05:00
|
|
|
--> $DIR/for.rs:6:23
|
|
|
|
|
|
|
|
|
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
|
2019-04-15 14:54:18 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2017-10-06 15:30:23 -05:00
|
|
|
|
2019-04-15 14:54:18 -05:00
|
|
|
Some errors have detailed explanations: E0009, E0507.
|
|
|
|
For more information about an error, try `rustc --explain E0009`.
|