]> git.lizzy.rs Git - rust.git/blob - src/test/ui/by-move-pattern-binding.stderr
Update ui tests
[rust.git] / src / test / ui / by-move-pattern-binding.stderr
1 error[E0507]: cannot move out of a shared reference
2   --> $DIR/by-move-pattern-binding.rs:14:11
3    |
4 LL |     match &s.x {
5    |           ^^^^
6 LL |         &E::Foo => {}
7 LL |         &E::Bar(identifier) => f(identifier.clone())
8    |         -------------------
9    |         |       |
10    |         |       data moved here
11    |         |       move occurs because `identifier` has type `std::string::String`, which does not implement the `Copy` trait
12    |         help: consider removing the `&`: `E::Bar(identifier)`
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0507`.