fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
694 B21 linesraw
1error[E0009]: cannot bind by-move and by-ref in the same pattern
2  --> $DIR/for.rs:6:13
3   |
4LL |     for (n, mut m) in &tups {
5   |          -  ^^^^^ by-move pattern here
6   |          |
7   |          both by-ref and by-move used
8
9error[E0507]: cannot move out of a shared reference
10  --> $DIR/for.rs:6:23
11   |
12LL |     for (n, mut m) in &tups {
13   |             -----     ^^^^^
14   |             |
15   |             data moved here
16   |             move occurs because `m` has type `Foo`, which does not implement the `Copy` trait
17
18error: aborting due to 2 previous errors
19
20Some errors have detailed explanations: E0009, E0507.
21For more information about an error, try `rustc --explain E0009`.