Skip to content

Commit 946ef2a

Browse files
committed
fix tests
1 parent 926359d commit 946ef2a

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

tests/ui/binding/issue-40402-2.stderr

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ LL | let (a, b) = x[0];
88
| data moved here
99
|
1010
= note: move occurs because these variables have types that don't implement the `Copy` trait
11-
help: consider borrowing here
11+
help: consider borrowing the pattern binding
1212
|
13-
LL | let (a, b) = &x[0];
14-
| +
13+
LL | let (ref a, b) = x[0];
14+
| +++
15+
help: consider borrowing the pattern binding
16+
|
17+
LL | let (a, ref b) = x[0];
18+
| +++
1519

1620
error: aborting due to 1 previous error
1721

tests/ui/nll/move-errors.stderr

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,14 @@ LL | B::V(s) => (),
156156
| - ...and here
157157
|
158158
= note: move occurs because these variables have types that don't implement the `Copy` trait
159-
help: consider borrowing here
159+
help: consider borrowing the pattern binding
160+
|
161+
LL | B::U(ref d) => (),
162+
| +++
163+
help: consider borrowing the pattern binding
160164
|
161-
LL | match &x[0] {
162-
| +
165+
LL | B::V(ref s) => (),
166+
| +++
163167

164168
error[E0509]: cannot move out of type `D`, which implements the `Drop` trait
165169
--> $DIR/move-errors.rs:83:11

0 commit comments

Comments
 (0)