fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
3.9 KiB113 linesraw
1error[E0382]: use of moved value: `a[..]`
2  --> $DIR/borrowck-move-out-from-array-match.rs:13:14
3   |
4LL |         [_, _, _x] => {}
5   |                -- value moved here
6...
7LL |         [.., _y] => {}
8   |              ^^ value used 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
12error[E0382]: use of moved value: `a[..]`
13  --> $DIR/borrowck-move-out-from-array-match.rs:23:14
14   |
15LL |         [_, _, (_x, _)] => {}
16   |                 -- value moved here
17...
18LL |         [.., _y] => {}
19   |              ^^ value used 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
23error[E0382]: use of moved value: `a[..].0`
24  --> $DIR/borrowck-move-out-from-array-match.rs:33:15
25   |
26LL |         [_, _, (_x, _)] => {}
27   |                 -- value moved here
28...
29LL |         [.., (_y, _)] => {}
30   |               ^^ value used here after move
31   |
32   = note: move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait
33
34error[E0382]: use of moved value: `a`
35  --> $DIR/borrowck-move-out-from-array-match.rs:44:11
36   |
37LL |         [_x, _, _] => {}
38   |          -- value moved here
39LL |     }
40LL |     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
45error[E0382]: use of moved value: `a`
46  --> $DIR/borrowck-move-out-from-array-match.rs:55:11
47   |
48LL |         [.., _x] => {}
49   |              -- value moved here
50LL |     }
51LL |     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
56error[E0382]: use of moved value: `a`
57  --> $DIR/borrowck-move-out-from-array-match.rs:66:11
58   |
59LL |         [(_x, _), _, _] => {}
60   |           -- value moved here
61LL |     }
62LL |     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
67error[E0382]: use of moved value: `a`
68  --> $DIR/borrowck-move-out-from-array-match.rs:77:11
69   |
70LL |         [.., (_x, _)] => {}
71   |               -- value moved here
72LL |     }
73LL |     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
78error[E0382]: use of moved value: `a[..].0`
79  --> $DIR/borrowck-move-out-from-array-match.rs:89:11
80   |
81LL |         [_y @ .., _, _] => {}
82   |          ------- value moved here
83...
84LL |         [(_x, _), _, _] => {}
85   |           ^^ value used 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
89error[E0382]: use of moved value: `a[..].0`
90  --> $DIR/borrowck-move-out-from-array-match.rs:99:15
91   |
92LL |         [_, _, _y @ ..] => {}
93   |                ------- value moved here
94...
95LL |         [.., (_x, _)] => {}
96   |               ^^ value used 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
100error[E0382]: use of moved value: `a`
101  --> $DIR/borrowck-move-out-from-array-match.rs:110:11
102   |
103LL |         [x @ .., _] => {}
104   |          ------ value moved here
105LL |     }
106LL |     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
111error: aborting due to 10 previous errors
112
113For more information about this error, try `rustc --explain E0382`.