]> git.proxmox.com Git - rustc.git/blob - tests/ui/borrowck/borrowck-move-out-from-array-match.stderr
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / ui / borrowck / borrowck-move-out-from-array-match.stderr
1 error[E0382]: use of moved value: `a[..]`
2 --> $DIR/borrowck-move-out-from-array-match.rs:13:14
3 |
4 LL | [_, _, _x] => {}
5 | -- value moved here
6 ...
7 LL | [.., _y] => {}
8 | ^^ value used here after move
9 |
10 = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
11 help: borrow this binding in the pattern to avoid moving the value
12 |
13 LL | [_, _, ref _x] => {}
14 | +++
15
16 error[E0382]: use of partially moved value: `a[..]`
17 --> $DIR/borrowck-move-out-from-array-match.rs:23:14
18 |
19 LL | [_, _, (_x, _)] => {}
20 | -- value partially moved here
21 ...
22 LL | [.., _y] => {}
23 | ^^ value used here after partial move
24 |
25 = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
26 help: borrow this binding in the pattern to avoid moving the value
27 |
28 LL | [_, _, (ref _x, _)] => {}
29 | +++
30
31 error[E0382]: use of moved value: `a[..].0`
32 --> $DIR/borrowck-move-out-from-array-match.rs:33:15
33 |
34 LL | [_, _, (_x, _)] => {}
35 | -- value moved here
36 ...
37 LL | [.., (_y, _)] => {}
38 | ^^ value used here after move
39 |
40 = note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
41 help: borrow this binding in the pattern to avoid moving the value
42 |
43 LL | [_, _, (ref _x, _)] => {}
44 | +++
45
46 error[E0382]: use of partially moved value: `a`
47 --> $DIR/borrowck-move-out-from-array-match.rs:45:10
48 |
49 LL | [_x, _, _] => {}
50 | -- value partially moved here
51 ...
52 LL | [_y @ .., _, _] => {}
53 | ^^ value used here after partial move
54 |
55 = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
56 help: borrow this binding in the pattern to avoid moving the value
57 |
58 LL | [ref _x, _, _] => {}
59 | +++
60
61 error[E0382]: use of partially moved value: `a`
62 --> $DIR/borrowck-move-out-from-array-match.rs:56:16
63 |
64 LL | [.., _x] => {}
65 | -- value partially moved here
66 ...
67 LL | [_, _, _y @ ..] => {}
68 | ^^ value used here after partial move
69 |
70 = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
71 help: borrow this binding in the pattern to avoid moving the value
72 |
73 LL | [.., ref _x] => {}
74 | +++
75
76 error[E0382]: use of partially moved value: `a`
77 --> $DIR/borrowck-move-out-from-array-match.rs:67:10
78 |
79 LL | [(_x, _), _, _] => {}
80 | -- value partially moved here
81 ...
82 LL | [_y @ .., _, _] => {}
83 | ^^ value used here after partial move
84 |
85 = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
86 help: borrow this binding in the pattern to avoid moving the value
87 |
88 LL | [(ref _x, _), _, _] => {}
89 | +++
90
91 error[E0382]: use of partially moved value: `a`
92 --> $DIR/borrowck-move-out-from-array-match.rs:78:16
93 |
94 LL | [.., (_x, _)] => {}
95 | -- value partially moved here
96 ...
97 LL | [_, _, _y @ ..] => {}
98 | ^^ value used here after partial move
99 |
100 = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
101 help: borrow this binding in the pattern to avoid moving the value
102 |
103 LL | [.., (ref _x, _)] => {}
104 | +++
105
106 error[E0382]: use of moved value: `a[..].0`
107 --> $DIR/borrowck-move-out-from-array-match.rs:89:11
108 |
109 LL | [_y @ .., _, _] => {}
110 | -- value moved here
111 ...
112 LL | [(_x, _), _, _] => {}
113 | ^^ value used here after move
114 |
115 = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
116 help: borrow this binding in the pattern to avoid moving the value
117 |
118 LL | [ref _y @ .., _, _] => {}
119 | +++
120
121 error[E0382]: use of moved value: `a[..].0`
122 --> $DIR/borrowck-move-out-from-array-match.rs:99:15
123 |
124 LL | [_, _, _y @ ..] => {}
125 | -- value moved here
126 ...
127 LL | [.., (_x, _)] => {}
128 | ^^ value used here after move
129 |
130 = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
131 help: borrow this binding in the pattern to avoid moving the value
132 |
133 LL | [_, _, ref _y @ ..] => {}
134 | +++
135
136 error[E0382]: use of partially moved value: `a`
137 --> $DIR/borrowck-move-out-from-array-match.rs:111:13
138 |
139 LL | [x @ .., _] => {}
140 | - value partially moved here
141 ...
142 LL | [_, _y @ ..] => {}
143 | ^^ value used here after partial move
144 |
145 = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
146 help: borrow this binding in the pattern to avoid moving the value
147 |
148 LL | [ref x @ .., _] => {}
149 | +++
150
151 error: aborting due to 10 previous errors
152
153 For more information about this error, try `rustc --explain E0382`.