@@ -7,37 +7,55 @@ LL | #![feature(bindings_after_at)]
7
7
= note: `#[warn(incomplete_features)]` on by default
8
8
9
9
error[E0007]: cannot bind by-move with sub-bindings
10
- --> $DIR/borrowck-move-and-move.rs:12 :9
10
+ --> $DIR/borrowck-move-and-move.rs:13 :9
11
11
|
12
12
LL | let a @ b = U;
13
13
| ^^^^^ binds an already bound by-move value by moving it
14
14
15
15
error[E0007]: cannot bind by-move with sub-bindings
16
- --> $DIR/borrowck-move-and-move.rs:16 :9
16
+ --> $DIR/borrowck-move-and-move.rs:17 :9
17
17
|
18
18
LL | let a @ (b, c) = (U, U);
19
19
| ^^^^^^^^^^ binds an already bound by-move value by moving it
20
20
21
21
error[E0007]: cannot bind by-move with sub-bindings
22
- --> $DIR/borrowck-move-and-move.rs:20 :9
22
+ --> $DIR/borrowck-move-and-move.rs:21 :9
23
23
|
24
24
LL | let a @ (b, c) = (u(), u());
25
25
| ^^^^^^^^^^ binds an already bound by-move value by moving it
26
26
27
27
error[E0007]: cannot bind by-move with sub-bindings
28
- --> $DIR/borrowck-move-and-move.rs:25 :9
28
+ --> $DIR/borrowck-move-and-move.rs:26 :9
29
29
|
30
30
LL | a @ Ok(b) | a @ Err(b) => {}
31
31
| ^^^^^^^^^ binds an already bound by-move value by moving it
32
32
33
33
error[E0007]: cannot bind by-move with sub-bindings
34
- --> $DIR/borrowck-move-and-move.rs:25 :21
34
+ --> $DIR/borrowck-move-and-move.rs:26 :21
35
35
|
36
36
LL | a @ Ok(b) | a @ Err(b) => {}
37
37
| ^^^^^^^^^^ binds an already bound by-move value by moving it
38
38
39
+ error[E0007]: cannot bind by-move with sub-bindings
40
+ --> $DIR/borrowck-move-and-move.rs:38:9
41
+ |
42
+ LL | xs @ [a, .., b] => {}
43
+ | ^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
44
+
45
+ error[E0007]: cannot bind by-move with sub-bindings
46
+ --> $DIR/borrowck-move-and-move.rs:44:9
47
+ |
48
+ LL | xs @ [_, ys @ .., _] => {}
49
+ | ^^^^^^^^^^^^^^^^^^^^ binds an already bound by-move value by moving it
50
+
51
+ error[E0007]: cannot bind by-move with sub-bindings
52
+ --> $DIR/borrowck-move-and-move.rs:33:12
53
+ |
54
+ LL | fn fun(a @ b: U) {}
55
+ | ^^^^^ binds an already bound by-move value by moving it
56
+
39
57
error[E0382]: use of moved value
40
- --> $DIR/borrowck-move-and-move.rs:12 :13
58
+ --> $DIR/borrowck-move-and-move.rs:13 :13
41
59
|
42
60
LL | let a @ b = U;
43
61
| ----^ - move occurs because value has type `main::U`, which does not implement the `Copy` trait
@@ -46,7 +64,7 @@ LL | let a @ b = U;
46
64
| value moved here
47
65
48
66
error[E0382]: use of moved value
49
- --> $DIR/borrowck-move-and-move.rs:16 :17
67
+ --> $DIR/borrowck-move-and-move.rs:17 :17
50
68
|
51
69
LL | let a @ (b, c) = (U, U);
52
70
| --------^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
@@ -55,7 +73,7 @@ LL | let a @ (b, c) = (U, U);
55
73
| value moved here
56
74
57
75
error[E0382]: use of moved value
58
- --> $DIR/borrowck-move-and-move.rs:20 :17
76
+ --> $DIR/borrowck-move-and-move.rs:21 :17
59
77
|
60
78
LL | let a @ (b, c) = (u(), u());
61
79
| --------^- ---------- move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait
@@ -64,7 +82,7 @@ LL | let a @ (b, c) = (u(), u());
64
82
| value moved here
65
83
66
84
error[E0382]: use of moved value
67
- --> $DIR/borrowck-move-and-move.rs:25 :16
85
+ --> $DIR/borrowck-move-and-move.rs:26 :16
68
86
|
69
87
LL | match Ok(U) {
70
88
| ----- move occurs because value has type `std::result::Result<main::U, main::U>`, which does not implement the `Copy` trait
@@ -75,7 +93,7 @@ LL | a @ Ok(b) | a @ Err(b) => {}
75
93
| value moved here
76
94
77
95
error[E0382]: use of moved value
78
- --> $DIR/borrowck-move-and-move.rs:25 :29
96
+ --> $DIR/borrowck-move-and-move.rs:26 :29
79
97
|
80
98
LL | match Ok(U) {
81
99
| ----- move occurs because value has type `std::result::Result<main::U, main::U>`, which does not implement the `Copy` trait
@@ -85,7 +103,39 @@ LL | a @ Ok(b) | a @ Err(b) => {}
85
103
| | value used here after move
86
104
| value moved here
87
105
88
- error: aborting due to 10 previous errors
106
+ error[E0382]: use of moved value
107
+ --> $DIR/borrowck-move-and-move.rs:38:22
108
+ |
109
+ LL | match [u(), u(), u(), u()] {
110
+ | -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait
111
+ LL | xs @ [a, .., b] => {}
112
+ | -------------^-
113
+ | | |
114
+ | | value used here after move
115
+ | value moved here
116
+
117
+ error[E0382]: use of moved value
118
+ --> $DIR/borrowck-move-and-move.rs:44:18
119
+ |
120
+ LL | match [u(), u(), u(), u()] {
121
+ | -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait
122
+ LL | xs @ [_, ys @ .., _] => {}
123
+ | ---------^^^^^^^----
124
+ | | |
125
+ | | value used here after move
126
+ | value moved here
127
+
128
+ error[E0382]: use of moved value
129
+ --> $DIR/borrowck-move-and-move.rs:33:16
130
+ |
131
+ LL | fn fun(a @ b: U) {}
132
+ | ----^
133
+ | | |
134
+ | | value used here after move
135
+ | value moved here
136
+ | move occurs because value has type `main::U`, which does not implement the `Copy` trait
137
+
138
+ error: aborting due to 16 previous errors
89
139
90
140
Some errors have detailed explanations: E0007, E0382.
91
141
For more information about an error, try `rustc --explain E0007`.
0 commit comments