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