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