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

39 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0507]: cannot move out of borrowed content
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-move-error-with-note.rs:11:11
|
2019-03-09 06:03:44 -06:00
LL | match *f {
| ^^ cannot move out of borrowed content
2019-03-09 06:03:44 -06:00
LL |
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
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-move-error-with-note.rs:30:9
|
2019-03-09 06:03:44 -06:00
LL | / S {
LL | |
2018-02-22 18:42:32 -06:00
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
2018-12-25 09:56:47 -06:00
--> $DIR/borrowck-move-error-with-note.rs:47:11
|
2019-03-09 06:03:44 -06:00
LL | match a.a {
| ^ cannot move out of borrowed content
2019-03-09 06:03:44 -06:00
LL |
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
Some errors have detailed explanations: E0507, E0509.
2018-03-03 08:59:40 -06:00
For more information about an error, try `rustc --explain E0507`.