fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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