fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
1.1 KiB34 linesraw
1error[E0382]: use of moved value: `x`
2  --> $DIR/ref-suggestion.rs:4:5
3   |
4LL |     let x = vec![1];
5   |         - move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
6LL |     let y = x;
7   |             - value moved here
8LL |     x;
9   |     ^ value used here after move
10
11error[E0382]: use of moved value: `x`
12  --> $DIR/ref-suggestion.rs:8:5
13   |
14LL |     let x = vec![1];
15   |         - move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
16LL |     let mut y = x;
17   |                 - value moved here
18LL |     x;
19   |     ^ value used here after move
20
21error[E0382]: use of moved value: `x`
22  --> $DIR/ref-suggestion.rs:16:5
23   |
24LL |         (Some(y), ()) => {},
25   |               - value moved here
26...
27LL |     x;
28   |     ^ value used here after partial move
29   |
30   = note: move occurs because value has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
31
32error: aborting due to 3 previous errors
33
34For more information about this error, try `rustc --explain E0382`.