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