2021-01-12 02:31:13 -06:00
|
|
|
error[E0382]: use of moved value
|
|
|
|
--> $DIR/move-in-pattern-mut-in-loop.rs:7:21
|
|
|
|
|
|
|
|
|
LL | if let Some(mut _x) = opt {}
|
|
|
|
| ^^^^^^ value moved here, in previous iteration of loop
|
|
|
|
|
|
|
|
|
= note: move occurs because value has type `&mut i32`, which does not implement the `Copy` trait
|
2022-11-02 23:22:24 -05:00
|
|
|
help: borrow this binding in the pattern to avoid moving the value
|
2021-01-12 02:31:13 -06:00
|
|
|
|
|
|
|
|
LL | if let Some(ref mut _x) = opt {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| +++
|
2021-01-12 02:31:13 -06:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-01-12 02:31:13 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|