2020-11-02 00:05:55 +05:30
|
|
|
error[E0382]: use of partially moved value
|
2021-05-17 21:14:06 -07:00
|
|
|
--> $DIR/copy-and-move-mixed.rs:12:9
|
2019-11-11 11:39:52 +01:00
|
|
|
|
|
|
|
|
LL | let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
|
2022-09-04 00:55:53 +02:00
|
|
|
| ^ - value partially moved here
|
|
|
|
| |
|
2020-11-02 00:05:55 +05:30
|
|
|
| value used here after partial move
|
2019-11-11 11:39:52 +01:00
|
|
|
|
|
2020-11-02 00:05:55 +05:30
|
|
|
= note: partial move occurs because value has type `NC<C, C>`, which does not implement the `Copy` trait
|
2022-11-02 21:22:24 -07:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
2022-11-15 09:01:20 -08:00
|
|
|
LL | let ref a @ NC(b, ref c @ NC(d, e)) = NC(C, NC(C, C));
|
|
|
|
| +++ +++
|
2019-11-11 11:39:52 +01:00
|
|
|
|
2020-11-02 00:05:55 +05:30
|
|
|
error: aborting due to previous error
|
2019-11-11 11:39:52 +01:00
|
|
|
|
2020-01-19 02:47:01 +01:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|