fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0507]: cannot move out of `f` as enum variant `Foo1` which is behind a shared reference 2 --> $DIR/borrowck-move-error-with-note.rs:13:11 3 | 4LL | match *f { 5 | ^^ 6LL | Foo::Foo1(num1, 7 | ---- data moved here 8LL | num2) => (), 9 | ---- ...and here 10LL | Foo::Foo2(num) => (), 11 | --- ...and here 12 | 13 = note: move occurs because these variables have types that don't implement the `Copy` trait 14help: consider removing the dereference here 15 | 16LL - match *f { 17LL + match f { 18 | 19 20error[E0509]: cannot move out of type `S`, which implements the `Drop` trait 21 --> $DIR/borrowck-move-error-with-note.rs:30:11 22 | 23LL | match (S {f: "foo".to_string(), g: "bar".to_string()}) { 24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here 25... 26LL | f: _s, 27 | -- data moved here 28LL | g: _t 29 | -- ...and here 30 | 31 = note: move occurs because these variables have types that don't implement the `Copy` trait 32help: consider borrowing the pattern binding 33 | 34LL | f: ref _s, 35 | +++ 36help: consider borrowing the pattern binding 37 | 38LL | g: ref _t 39 | +++ 40 41error[E0507]: cannot move out of `a.a` which is behind a shared reference 42 --> $DIR/borrowck-move-error-with-note.rs:48:11 43 | 44LL | match a.a { 45 | ^^^ 46LL | n => { 47 | - 48 | | 49 | data moved here 50 | move occurs because `n` has type `Box<isize>`, which does not implement the `Copy` trait 51 | 52help: consider borrowing here 53 | 54LL | match &a.a { 55 | + 56 57error: aborting due to 3 previous errors 58 59Some errors have detailed explanations: E0507, E0509. 60For more information about an error, try `rustc --explain E0507`.