When an error occurs due to a partial move, we would use the world "partial" in some parts of the error message, but not in others. This commit ensures that we use the word 'partial' in either all or none of the diagnostic messages. Additionally, we no longer describe a move out of a `Box` via `*` as a 'partial move'. This was a pre-existing issue, but became more noticable when the word 'partial' is used in more places.
17 lines
310 B
Rust
17 lines
310 B
Rust
fn main() {
|
|
let x = vec![1];
|
|
let y = x;
|
|
x; //~ ERROR use of moved value
|
|
|
|
let x = vec![1];
|
|
let mut y = x;
|
|
x; //~ ERROR use of moved value
|
|
|
|
let x = (Some(vec![1]), ());
|
|
|
|
match x {
|
|
(Some(y), ()) => {},
|
|
_ => {},
|
|
}
|
|
x; //~ ERROR use of partially moved value
|
|
}
|