You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fn main() {
let x = box 5i;
let y = x;
println!("{}", *x);
}
This yields error: use of partially moved value: *x.
What exactly is a "partially moved value"?
I think that a value should either be moved, or not be moved.
Perhaps a cleaner message could be: "x" is no longer a valid pointer, did you mean "y"? or something along these lines.
The text was updated successfully, but these errors were encountered:
Previously it output `partially moved` to eagerly. This updates it to be more
accurate and output `collaterally moved` for use of values that were invalidated
by moves out of different fields in the same struct.
Closesrust-lang#15630.
Consider the following code:
This yields
error: use of partially moved value: *x
.What exactly is a "partially moved value"?
I think that a value should either be moved, or not be moved.
Perhaps a cleaner message could be:
"x" is no longer a valid pointer, did you mean "y"?
or something along these lines.The text was updated successfully, but these errors were encountered: