]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/option-content-move-from-tuple-match.stderr
Rollup merge of #106751 - clubby789:const-intrinsic, r=GuillaumeGomez
[rust.git] / tests / ui / suggestions / option-content-move-from-tuple-match.stderr
1 error[E0507]: cannot move out of a shared reference
2   --> $DIR/option-content-move-from-tuple-match.rs:2:11
3    |
4 LL |     match (a, b) {
5    |           ^^^^^^
6 LL |
7 LL |         (None, &c) => &c.unwrap(),
8    |                 -
9    |                 |
10    |                 data moved here
11    |                 move occurs because `c` has type `Option<String>`, which does not implement the `Copy` trait
12    |
13 help: consider borrowing the pattern binding
14    |
15 LL |         (None, &ref c) => &c.unwrap(),
16    |                 +++
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0507`.