@@ -7,37 +7,55 @@ LL | #![feature(bindings_after_at)]
77 = note: `#[warn(incomplete_features)]` on by default
88
99error[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
1111 |
1212LL | let a @ b = U;
1313 | ^^^^^ binds an already bound by-move value by moving it
1414
1515error[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
1717 |
1818LL | let a @ (b, c) = (U, U);
1919 | ^^^^^^^^^^ binds an already bound by-move value by moving it
2020
2121error[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
2323 |
2424LL | let a @ (b, c) = (u(), u());
2525 | ^^^^^^^^^^ binds an already bound by-move value by moving it
2626
2727error[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
2929 |
3030LL | a @ Ok(b) | a @ Err(b) => {}
3131 | ^^^^^^^^^ binds an already bound by-move value by moving it
3232
3333error[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
3535 |
3636LL | a @ Ok(b) | a @ Err(b) => {}
3737 | ^^^^^^^^^^ binds an already bound by-move value by moving it
3838
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+
3957error[E0382]: use of moved value
40- --> $DIR/borrowck-move-and-move.rs:12 :13
58+ --> $DIR/borrowck-move-and-move.rs:13 :13
4159 |
4260LL | let a @ b = U;
4361 | ----^ - move occurs because value has type `main::U`, which does not implement the `Copy` trait
@@ -46,7 +64,7 @@ LL | let a @ b = U;
4664 | value moved here
4765
4866error[E0382]: use of moved value
49- --> $DIR/borrowck-move-and-move.rs:16 :17
67+ --> $DIR/borrowck-move-and-move.rs:17 :17
5068 |
5169LL | let a @ (b, c) = (U, U);
5270 | --------^- ------ 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);
5573 | value moved here
5674
5775error[E0382]: use of moved value
58- --> $DIR/borrowck-move-and-move.rs:20 :17
76+ --> $DIR/borrowck-move-and-move.rs:21 :17
5977 |
6078LL | let a @ (b, c) = (u(), u());
6179 | --------^- ---------- 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());
6482 | value moved here
6583
6684error[E0382]: use of moved value
67- --> $DIR/borrowck-move-and-move.rs:25 :16
85+ --> $DIR/borrowck-move-and-move.rs:26 :16
6886 |
6987LL | match Ok(U) {
7088 | ----- 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) => {}
7593 | value moved here
7694
7795error[E0382]: use of moved value
78- --> $DIR/borrowck-move-and-move.rs:25 :29
96+ --> $DIR/borrowck-move-and-move.rs:26 :29
7997 |
8098LL | match Ok(U) {
8199 | ----- 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) => {}
85103 | | value used here after move
86104 | value moved here
87105
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
89139
90140Some errors have detailed explanations: E0007, E0382.
91141For more information about an error, try `rustc --explain E0007`.
0 commit comments