11error: struct destructuring with rest (..)
2- --> tests/ui/rest_when_destructuring_struct.rs:23 :9
2+ --> tests/ui/rest_when_destructuring_struct.rs:28 :9
33 |
44LL | let S { a, b, .. } = s;
55 | ^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL + let S { a, b, c: _ } = s;
1313 |
1414
1515error: struct destructuring with rest (..)
16- --> tests/ui/rest_when_destructuring_struct.rs:26 :9
16+ --> tests/ui/rest_when_destructuring_struct.rs:31 :9
1717 |
1818LL | let S { a, b, c, .. } = s;
1919 | ^^^^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL + let S { a, b, c, } = s;
2525 |
2626
2727error: struct destructuring with rest (..)
28- --> tests/ui/rest_when_destructuring_struct.rs:33 :9
28+ --> tests/ui/rest_when_destructuring_struct.rs:38 :9
2929 |
3030LL | E::B { .. } => (),
3131 | ^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL + E::B { b1: _, b2: _ } => (),
3737 |
3838
3939error: struct destructuring with rest (..)
40- --> tests/ui/rest_when_destructuring_struct.rs:35 :9
40+ --> tests/ui/rest_when_destructuring_struct.rs:40 :9
4141 |
4242LL | E::C { .. } => (),
4343 | ^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + E::C { } => (),
4949 |
5050
5151error: struct destructuring with rest (..)
52- --> tests/ui/rest_when_destructuring_struct.rs:41 :9
52+ --> tests/ui/rest_when_destructuring_struct.rs:46 :9
5353 |
5454LL | E::B { b1: _, .. } => (),
5555 | ^^^^^^^^^^^^^^^^^^
@@ -60,5 +60,16 @@ LL - E::B { b1: _, .. } => (),
6060LL + E::B { b1: _, b2: _ } => (),
6161 |
6262
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
6475
0 commit comments