rust/src/test/ui/rfc-2005-default-binding-mode/for.stderr

22 lines
685 B
Plaintext
Raw Normal View History

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
|
2018-02-22 18:42:32 -06:00
LL | for (n, mut m) in &tups {
| - ^^^^^ by-move pattern here
| |
| by-ref pattern here
error[E0507]: cannot move out of a shared reference
--> $DIR/for.rs:6:23
|
LL | for (n, mut m) in &tups {
| ----- ^^^^^
| |
| data moved here
| move occurs because `m` has type `Foo`, which does not implement the `Copy` trait
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0009, E0507.
For more information about an error, try `rustc --explain E0009`.