1
1
error: struct destructuring with rest (..)
2
- --> tests/ui/rest_when_destructuring_struct.rs:23 :9
2
+ --> tests/ui/rest_when_destructuring_struct.rs:28 :9
3
3
|
4
4
LL | let S { a, b, .. } = s;
5
5
| ^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL + let S { a, b, c: _ } = s;
13
13
|
14
14
15
15
error: struct destructuring with rest (..)
16
- --> tests/ui/rest_when_destructuring_struct.rs:26 :9
16
+ --> tests/ui/rest_when_destructuring_struct.rs:31 :9
17
17
|
18
18
LL | let S { a, b, c, .. } = s;
19
19
| ^^^^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL + let S { a, b, c, } = s;
25
25
|
26
26
27
27
error: struct destructuring with rest (..)
28
- --> tests/ui/rest_when_destructuring_struct.rs:33 :9
28
+ --> tests/ui/rest_when_destructuring_struct.rs:38 :9
29
29
|
30
30
LL | E::B { .. } => (),
31
31
| ^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL + E::B { b1: _, b2: _ } => (),
37
37
|
38
38
39
39
error: struct destructuring with rest (..)
40
- --> tests/ui/rest_when_destructuring_struct.rs:35 :9
40
+ --> tests/ui/rest_when_destructuring_struct.rs:40 :9
41
41
|
42
42
LL | E::C { .. } => (),
43
43
| ^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + E::C { } => (),
49
49
|
50
50
51
51
error: struct destructuring with rest (..)
52
- --> tests/ui/rest_when_destructuring_struct.rs:41 :9
52
+ --> tests/ui/rest_when_destructuring_struct.rs:46 :9
53
53
|
54
54
LL | E::B { b1: _, .. } => (),
55
55
| ^^^^^^^^^^^^^^^^^^
@@ -60,5 +60,16 @@ LL - E::B { b1: _, .. } => (),
60
60
LL + E::B { b1: _, b2: _ } => (),
61
61
|
62
62
63
- error: aborting due to 5 previous errors
63
+ error: struct destructuring with rest (..)
64
+ --> tests/ui/rest_when_destructuring_struct.rs:63:9
65
+ |
66
+ LL | let NonExhaustiveStruct { field1: _, .. } = ne;
67
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
+ |
69
+ help: consider explicitly ignoring remaining fields with wildcard patterns (x: _)
70
+ |
71
+ LL | let NonExhaustiveStruct { field1: _, field2: _, .. } = ne;
72
+ | ++++++++++
73
+
74
+ error: aborting due to 6 previous errors
64
75
0 commit comments