X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fsuggestions%2Foption-content-move.stderr;h=94766530091552c0f393824858ad88eb46066cfe;hb=aa9e6aa8ad96888eb63e391a9d40373283c189b2;hp=c00a0f1700bb44e417b6c33a6009f9e73dc66efb;hpb=fb311e14d51384fdb6ef02b488e0420d82ee2442;p=rust.git diff --git a/src/test/ui/suggestions/option-content-move.stderr b/src/test/ui/suggestions/option-content-move.stderr index c00a0f1700b..94766530091 100644 --- a/src/test/ui/suggestions/option-content-move.stderr +++ b/src/test/ui/suggestions/option-content-move.stderr @@ -2,19 +2,23 @@ error[E0507]: cannot move out of `selection.1` which is behind a shared referenc --> $DIR/option-content-move.rs:11:20 | LL | if selection.1.unwrap().contains(selection.0) { - | ^^^^^^^^^^^ - | | - | move occurs because `selection.1` has type `Option`, which does not implement the `Copy` trait - | help: consider borrowing the `Option`'s content: `selection.1.as_ref()` + | ^^^^^^^^^^^ move occurs because `selection.1` has type `Option`, which does not implement the `Copy` trait + | +help: consider borrowing the `Option`'s content + | +LL | if selection.1.as_ref().unwrap().contains(selection.0) { + | ^^^^^^^^^ error[E0507]: cannot move out of `selection.1` which is behind a shared reference --> $DIR/option-content-move.rs:29:20 | LL | if selection.1.unwrap().contains(selection.0) { - | ^^^^^^^^^^^ - | | - | move occurs because `selection.1` has type `Result`, which does not implement the `Copy` trait - | help: consider borrowing the `Result`'s content: `selection.1.as_ref()` + | ^^^^^^^^^^^ move occurs because `selection.1` has type `Result`, which does not implement the `Copy` trait + | +help: consider borrowing the `Result`'s content + | +LL | if selection.1.as_ref().unwrap().contains(selection.0) { + | ^^^^^^^^^ error: aborting due to 2 previous errors