rust/src/test/ui/access-mode-in-closures.nll.stderr

19 lines
694 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0507]: cannot move out of borrowed content
--> $DIR/access-mode-in-closures.rs:18:15
2018-08-08 07:28:26 -05:00
|
LL | match *s { S(v) => v } //~ ERROR cannot move out
| ^^ - data moved here
2018-08-08 07:28:26 -05:00
| |
| cannot move out of borrowed content
2018-08-14 14:38:37 -05:00
| help: consider removing the `*`: `s`
|
note: move occurs because `v` has type `std::vec::Vec<isize>`, which does not implement the `Copy` trait
--> $DIR/access-mode-in-closures.rs:18:22
2018-08-14 14:38:37 -05:00
|
LL | match *s { S(v) => v } //~ ERROR cannot move out
| ^
2018-08-08 07:28:26 -05:00
error: aborting due to previous error
2018-08-08 07:28:26 -05:00
For more information about this error, try `rustc --explain E0507`.