]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | error[E0507]: cannot move out of a shared reference |
48663c56 | 2 | --> $DIR/by-move-pattern-binding.rs:14:11 |
b7449926 | 3 | | |
48663c56 | 4 | LL | match &s.x { |
dc9dc135 | 5 | | ^^^^ |
48663c56 | 6 | LL | &E::Foo => {} |
532ac7d7 | 7 | LL | &E::Bar(identifier) => f(identifier.clone()) |
48663c56 | 8 | | ------------------- |
b7449926 | 9 | | | | |
48663c56 | 10 | | | data moved here |
1b1a35ee | 11 | | | move occurs because `identifier` has type `String`, which does not implement the `Copy` trait |
48663c56 | 12 | | help: consider removing the `&`: `E::Bar(identifier)` |
b7449926 XL |
13 | |
14 | error: aborting due to previous error | |
15 | ||
16 | For more information about this error, try `rustc --explain E0507`. |