fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.8 KiB112 linesraw
1error[E0382]: use of moved value
2  --> $DIR/borrowck-move-and-move.rs:11:9
3   |
4LL |     let a @ b = U;
5   |         ^   -   - move occurs because value has type `U`, which does not implement the `Copy` trait
6   |         |   |
7   |         |   value moved here
8   |         value used here after move
9   |
10help: borrow this binding in the pattern to avoid moving the value
11   |
12LL |     let ref a @ ref b = U;
13   |         +++     +++
14
15error[E0382]: use of partially moved value
16  --> $DIR/borrowck-move-and-move.rs:13:9
17   |
18LL |     let a @ (b, c) = (U, U);
19   |         ^       - value partially moved here
20   |         |
21   |         value used here after partial move
22   |
23   = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
24help: borrow this binding in the pattern to avoid moving the value
25   |
26LL |     let ref a @ (b, ref c) = (U, U);
27   |         +++         +++
28
29error[E0382]: use of partially moved value
30  --> $DIR/borrowck-move-and-move.rs:15:9
31   |
32LL |     let a @ (b, c) = (u(), u());
33   |         ^       - value partially moved here
34   |         |
35   |         value used here after partial move
36   |
37   = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
38help: borrow this binding in the pattern to avoid moving the value
39   |
40LL |     let ref a @ (b, ref c) = (u(), u());
41   |         +++         +++
42
43error[E0382]: use of moved value
44  --> $DIR/borrowck-move-and-move.rs:18:16
45   |
46LL |     match Ok(U) {
47   |           ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait
48LL |         a @ Ok(b) | a @ Err(b) => {}
49   |         -      ^ value used here after move
50   |         |
51   |         value moved here
52   |
53help: borrow this binding in the pattern to avoid moving the value
54   |
55LL |         ref a @ Ok(b) | a @ Err(b) => {}
56   |         +++
57
58error[E0382]: use of moved value
59  --> $DIR/borrowck-move-and-move.rs:18:29
60   |
61LL |     match Ok(U) {
62   |           ----- move occurs because value has type `Result<U, U>`, which does not implement the `Copy` trait
63LL |         a @ Ok(b) | a @ Err(b) => {}
64   |                     -       ^ value used here after move
65   |                     |
66   |                     value moved here
67   |
68help: borrow this binding in the pattern to avoid moving the value
69   |
70LL |         a @ Ok(b) | ref a @ Err(b) => {}
71   |                     +++
72
73error[E0382]: use of partially moved value
74  --> $DIR/borrowck-move-and-move.rs:25:9
75   |
76LL |         xs @ [a, .., b] => {}
77   |         ^^           - value partially moved here
78   |         |
79   |         value used here after partial move
80   |
81   = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
82help: borrow this binding in the pattern to avoid moving the value
83   |
84LL |         ref xs @ [a, .., ref b] => {}
85   |         +++              +++
86
87error[E0382]: use of partially moved value
88  --> $DIR/borrowck-move-and-move.rs:29:9
89   |
90LL |         xs @ [_, ys @ .., _] => {}
91   |         ^^       -- value partially moved here
92   |         |
93   |         value used here after partial move
94   |
95   = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
96help: borrow this binding in the pattern to avoid moving the value
97   |
98LL |         ref xs @ [_, ref ys @ .., _] => {}
99   |         +++          +++
100
101error[E0382]: use of moved value
102  --> $DIR/borrowck-move-and-move.rs:22:12
103   |
104LL |     fn fun(a @ b: U) {}
105   |            ^   - value moved here
106   |            |
107   |            value used here after move
108   |            move occurs because value has type `U`, which does not implement the `Copy` trait
109
110error: aborting due to 8 previous errors
111
112For more information about this error, try `rustc --explain E0382`.