Closed
Description
We should add a help
message indicating that calling clone where the value was moved is a good idea, but we should only do this when the value is cloneable.
fn main() {
let a = String::new();
a;
a;
}
error[E0382]: use of moved value: `a`
--> test.rs:4:5
|
3 | a;
| - value moved here
4 | a;
| ^ value used here after move
|
= note: move occurs because `a` has type `std::string::String`, which does not implement the `Copy` trait
error: aborting due to previous error(s)