Update tests for changes to cannot move errors
This commit is contained in:
parent
9336b3d3d0
commit
8ffa408059
100 changed files with 724 additions and 1261 deletions
|
@ -5,6 +5,6 @@ pub fn main() {
|
|||
// The below desugars to &(ref n, mut m).
|
||||
for (n, mut m) in &tups {
|
||||
//~^ ERROR cannot bind by-move and by-ref in the same pattern
|
||||
//~| ERROR cannot move out of borrowed content
|
||||
//~| ERROR cannot move out of a shared reference
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,19 +6,14 @@ LL | for (n, mut m) in &tups {
|
|||
| |
|
||||
| both by-ref and by-move used
|
||||
|
||||
error[E0507]: cannot move out of borrowed content
|
||||
error[E0507]: cannot move out of a shared reference
|
||||
--> $DIR/for.rs:6:23
|
||||
|
|
||||
LL | for (n, mut m) in &tups {
|
||||
| ----- ^^^^^ cannot move out of borrowed content
|
||||
| ----- ^^^^^
|
||||
| |
|
||||
| data moved here
|
||||
|
|
||||
note: move occurs because `m` has type `Foo`, which does not implement the `Copy` trait
|
||||
--> $DIR/for.rs:6:13
|
||||
|
|
||||
LL | for (n, mut m) in &tups {
|
||||
| ^^^^^
|
||||
| move occurs because `m` has type `Foo`, which does not implement the `Copy` trait
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue