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