1 error[E0507]: cannot move out of a shared reference
2 --> $DIR/by-move-pattern-binding.rs:14:11
7 LL | &E::Bar(identifier) => f(identifier.clone())
11 | move occurs because `identifier` has type `String`, which does not implement the `Copy` trait
13 help: consider removing the borrow
15 LL - &E::Bar(identifier) => f(identifier.clone())
16 LL + E::Bar(identifier) => f(identifier.clone())
19 error[E0507]: cannot move out of a shared reference
20 --> $DIR/by-move-pattern-binding.rs:22:34
22 LL | if let &E::Bar(identifier) = &s.x {
26 | move occurs because `identifier` has type `String`, which does not implement the `Copy` trait
28 help: consider removing the borrow
30 LL - if let &E::Bar(identifier) = &s.x {
31 LL + if let E::Bar(identifier) = &s.x {
34 error[E0507]: cannot move out of a shared reference
35 --> $DIR/by-move-pattern-binding.rs:25:31
37 LL | let &E::Bar(identifier) = &s.x else {
41 | move occurs because `identifier` has type `String`, which does not implement the `Copy` trait
43 help: consider removing the borrow
45 LL - let &E::Bar(identifier) = &s.x else {
46 LL + let E::Bar(identifier) = &s.x else {
49 error: aborting due to 3 previous errors
51 For more information about this error, try `rustc --explain E0507`.