]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/moves-based-on-type-match-bindings.stderr
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / moves-based-on-type-match-bindings.stderr
1 error[E0382]: borrow of partially moved value: `x`
2   --> $DIR/moves-based-on-type-match-bindings.rs:16:11
3    |
4 LL |         Foo {f} => {}
5    |              - value partially moved here
6 ...
7 LL |     touch(&x);
8    |           ^^ value borrowed here after partial move
9    |
10    = note: partial move occurs because `x.f` has type `String`, which does not implement the `Copy` trait
11 help: borrow this binding in the pattern to avoid moving the value
12    |
13 LL |         Foo {ref f} => {}
14    |              +++
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0382`.