]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/option-content-move.stderr
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
[rust.git] / src / test / ui / suggestions / option-content-move.stderr
1 error[E0507]: cannot move out of `selection.1` which is behind a shared reference
2   --> $DIR/option-content-move.rs:11:20
3    |
4 LL |                 if selection.1.unwrap().contains(selection.0) {
5    |                    ^^^^^^^^^^^
6    |                    |
7    |                    move occurs because `selection.1` has type `Option<String>`, which does not implement the `Copy` trait
8    |                    help: consider borrowing the `Option`'s content: `selection.1.as_ref()`
9
10 error[E0507]: cannot move out of `selection.1` which is behind a shared reference
11   --> $DIR/option-content-move.rs:29:20
12    |
13 LL |                 if selection.1.unwrap().contains(selection.0) {
14    |                    ^^^^^^^^^^^
15    |                    |
16    |                    move occurs because `selection.1` has type `Result<String, String>`, which does not implement the `Copy` trait
17    |                    help: consider borrowing the `Result`'s content: `selection.1.as_ref()`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0507`.