rust/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
493 B
Plaintext
Raw Normal View History

error: borrow of moved value
--> $DIR/borrowck-pat-by-move-and-ref-inverse-promotion.rs:6:9
|
LL | let a @ ref b = U;
2023-02-27 11:39:02 -06:00
| ^ ----- value borrowed here after move
| |
| value moved into `a` here
| move occurs because `a` has type `U` which does not implement the `Copy` trait
|
help: borrow this binding in the pattern to avoid moving the value
|
LL | let ref a @ ref b = U;
| +++
error: aborting due to previous error