]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-deref-coercion.stderr
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / move-deref-coercion.stderr
1 error[E0382]: borrow of partially moved value: `val`
2   --> $DIR/move-deref-coercion.rs:25:5
3    |
4 LL |     let _val = val.first;
5    |                --------- value partially moved here
6 LL |     val.inner;
7    |     ^^^^^^^^^ value borrowed here after partial move
8    |
9    = note: partial move occurs because `val.first` has type `NotCopy`, which does not implement the `Copy` trait
10    = note: borrow occurs due to deref coercion to `NotCopy`
11 note: deref defined here
12   --> $DIR/move-deref-coercion.rs:17:5
13    |
14 LL |     type Target = NotCopy;
15    |     ^^^^^^^^^^^
16
17 error[E0382]: borrow of partially moved value: `val`
18   --> $DIR/move-deref-coercion.rs:30:5
19    |
20 LL |     let _val = val.first;
21    |                --------- value partially moved here
22 LL |     val.inner_method();
23    |     ^^^^^^^^^^^^^^^^^^ value borrowed here after partial move
24    |
25    = note: partial move occurs because `val.first` has type `NotCopy`, which does not implement the `Copy` trait
26    = note: borrow occurs due to deref coercion to `NotCopy`
27 note: deref defined here
28   --> $DIR/move-deref-coercion.rs:17:5
29    |
30 LL |     type Target = NotCopy;
31    |     ^^^^^^^^^^^
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0382`.