]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ref-suggestion.stderr
Auto merge of #105145 - Ayush1325:sequential-remote-server, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / ref-suggestion.stderr
1 error[E0382]: use of moved value: `x`
2   --> $DIR/ref-suggestion.rs:4:5
3    |
4 LL |     let x = vec![1];
5    |         - move occurs because `x` has type `Vec<i32>`, which does not implement the `Copy` trait
6 LL |     let y = x;
7    |             - value moved here
8 LL |     x;
9    |     ^ value used here after move
10    |
11 help: consider cloning the value if the performance cost is acceptable
12    |
13 LL |     let y = x.clone();
14    |              ++++++++
15
16 error[E0382]: use of moved value: `x`
17   --> $DIR/ref-suggestion.rs:8:5
18    |
19 LL |     let x = vec![1];
20    |         - move occurs because `x` has type `Vec<i32>`, which does not implement the `Copy` trait
21 LL |     let mut y = x;
22    |                 - value moved here
23 LL |     x;
24    |     ^ value used here after move
25    |
26 help: consider cloning the value if the performance cost is acceptable
27    |
28 LL |     let mut y = x.clone();
29    |                  ++++++++
30
31 error[E0382]: use of partially moved value: `x`
32   --> $DIR/ref-suggestion.rs:16:5
33    |
34 LL |         (Some(y), ()) => {},
35    |               - value partially moved here
36 ...
37 LL |     x;
38    |     ^ value used here after partial move
39    |
40    = note: partial move occurs because value has type `Vec<i32>`, which does not implement the `Copy` trait
41 help: borrow this binding in the pattern to avoid moving the value
42    |
43 LL |         (Some(ref y), ()) => {},
44    |               +++
45
46 error: aborting due to 3 previous errors
47
48 For more information about this error, try `rustc --explain E0382`.