2020-02-02 10:58:15 -06:00
|
|
|
error: borrow of moved value
|
2021-05-17 23:14:06 -05:00
|
|
|
--> $DIR/borrowck-pat-by-move-and-ref-inverse-promotion.rs:6:9
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let a @ ref b = U;
|
2023-02-27 11:39:02 -06:00
|
|
|
| ^ ----- value borrowed here after move
|
|
|
|
| |
|
2020-02-02 10:58:15 -06:00
|
|
|
| value moved into `a` here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `a` has type `U` which does not implement the `Copy` trait
|
2022-11-15 11:01:20 -06:00
|
|
|
|
|
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
|
|
|
|
|
|
|
|
LL | let ref a @ ref b = U;
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|