2017-12-10 13:47:55 -06:00
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/borrowck-move-error-with-note.rs:21:11
|
|
|
|
|
|
|
|
|
21 | match *f { //~ ERROR cannot move out of
|
|
|
|
| ^^ cannot move out of borrowed content
|
|
|
|
22 | //~| cannot move out
|
2017-12-10 14:29:24 -06:00
|
|
|
23 | Foo::Foo1(num1,
|
2017-12-10 13:47:55 -06:00
|
|
|
| ---- hint: to prevent move, use `ref num1` or `ref mut num1`
|
2017-12-10 14:29:24 -06:00
|
|
|
24 | num2) => (),
|
2017-12-10 13:47:55 -06:00
|
|
|
| ---- ...and here (use `ref num2` or `ref mut num2`)
|
2017-12-10 14:29:24 -06:00
|
|
|
25 | Foo::Foo2(num) => (),
|
2017-12-10 13:47:55 -06:00
|
|
|
| --- ...and here (use `ref num` or `ref mut num`)
|
|
|
|
|
|
|
|
error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
|
|
|
|
--> $DIR/borrowck-move-error-with-note.rs:40:9
|
|
|
|
|
|
|
|
|
40 | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait
|
|
|
|
41 | | //~| cannot move out of here
|
2017-12-10 14:29:24 -06:00
|
|
|
42 | | f: _s,
|
2017-12-10 13:47:55 -06:00
|
|
|
| | -- hint: to prevent move, use `ref _s` or `ref mut _s`
|
2017-12-10 14:29:24 -06:00
|
|
|
43 | | g: _t
|
2017-12-10 13:47:55 -06:00
|
|
|
| | -- ...and here (use `ref _t` or `ref mut _t`)
|
|
|
|
44 | | } => {}
|
|
|
|
| |_________^ cannot move out of here
|
|
|
|
|
|
|
|
error[E0507]: cannot move out of borrowed content
|
|
|
|
--> $DIR/borrowck-move-error-with-note.rs:57:11
|
|
|
|
|
|
|
|
|
57 | match a.a { //~ ERROR cannot move out of
|
|
|
|
| ^ cannot move out of borrowed content
|
|
|
|
58 | //~| cannot move out
|
2017-12-10 14:29:24 -06:00
|
|
|
59 | n => {
|
2017-12-10 13:47:55 -06:00
|
|
|
| - hint: to prevent move, use `ref n` or `ref mut n`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
You've got a few errors: E0507, E0509
|
|
|
|
If you want more information on an error, try using "rustc --explain E0507"
|