2020-01-18 19:47:01 -06:00
|
|
|
error[E0507]: cannot move out of a shared reference
|
2020-08-30 13:59:56 -05:00
|
|
|
--> $DIR/move-ref-patterns-default-binding-modes.rs:8:22
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
|
LL | let (a, mut b) = &p;
|
|
|
|
| ----- ^^
|
|
|
|
| |
|
|
|
|
| data moved here
|
2020-09-02 02:40:56 -05:00
|
|
|
| move occurs because `b` has type `U`, which does not implement the `Copy` trait
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
2022-12-08 19:14:56 -06:00
|
|
|
help: consider borrowing the pattern binding
|
|
|
|
|
|
|
|
|
LL | let (a, ref mut b) = &p;
|
|
|
|
| +++
|
2020-01-18 19:47:01 -06:00
|
|
|
|
2022-12-08 19:14:56 -06:00
|
|
|
error: aborting due to previous error
|
2020-01-18 19:47:01 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0507`.
|