rust/src/test/ui/borrowck/borrowck-move-error-with-note.stderr

39 lines
1.6 KiB
Plaintext
Raw Normal View History

error[E0507]: cannot move out of borrowed content
--> $DIR/borrowck-move-error-with-note.rs:21:11
|
2018-02-22 18:42:32 -06:00
LL | match *f { //~ ERROR cannot move out of
| ^^ cannot move out of borrowed content
2018-02-24 17:01:39 -06:00
LL | //~| cannot move out
2018-02-22 18:42:32 -06:00
LL | Foo::Foo1(num1,
| ---- hint: to prevent move, use `ref num1` or `ref mut num1`
2018-02-22 18:42:32 -06:00
LL | num2) => (),
| ---- ...and here (use `ref num2` or `ref mut num2`)
2018-02-22 18:42:32 -06:00
LL | Foo::Foo2(num) => (),
| --- ...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
|
2018-02-22 18:42:32 -06:00
LL | / S { //~ ERROR cannot move out of type `S`, which implements the `Drop` trait
LL | | //~| cannot move out of here
LL | | f: _s,
| | -- hint: to prevent move, use `ref _s` or `ref mut _s`
2018-02-22 18:42:32 -06:00
LL | | g: _t
| | -- ...and here (use `ref _t` or `ref mut _t`)
2018-02-22 18:42:32 -06:00
LL | | } => {}
| |_________^ cannot move out of here
error[E0507]: cannot move out of borrowed content
--> $DIR/borrowck-move-error-with-note.rs:57:11
|
2018-02-22 18:42:32 -06:00
LL | match a.a { //~ ERROR cannot move out of
| ^ cannot move out of borrowed content
2018-02-24 17:01:39 -06:00
LL | //~| cannot move out
2018-02-22 18:42:32 -06:00
LL | n => {
| - 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"