]> git.proxmox.com Git - rustc.git/blame - src/test/ui/by-move-pattern-binding.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / by-move-pattern-binding.stderr
CommitLineData
dc9dc135 1error[E0507]: cannot move out of a shared reference
48663c56 2 --> $DIR/by-move-pattern-binding.rs:14:11
b7449926 3 |
48663c56 4LL | match &s.x {
dc9dc135 5 | ^^^^
48663c56 6LL | &E::Foo => {}
532ac7d7 7LL | &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
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0507`.