1
Fork 0
rust/src/test/ui/by-move-pattern-binding.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
611 B
Text
Raw Normal View History

error[E0507]: cannot move out of a shared reference
--> $DIR/by-move-pattern-binding.rs:14:11
2018-08-08 14:28:26 +02:00
|
LL | match &s.x {
| ^^^^
LL | &E::Foo => {}
2019-03-09 15:03:44 +03:00
LL | &E::Bar(identifier) => f(identifier.clone())
| -------------------
2018-08-08 14:28:26 +02:00
| | |
| | data moved here
| | move occurs because `identifier` has type `String`, which does not implement the `Copy` trait
| help: consider removing the `&`: `E::Bar(identifier)`
2018-08-08 14:28:26 +02:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0507`.