File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ const F: extern "C" fn(...) = |_: ...| {};
88
99fn foo ( ) {
1010 let f = |... | { } ;
11- //~^ ERROR: `..` patterns are not allowed here
12- //~| ERROR: unexpected `...`
11+ //~^ ERROR: unexpected `...`
1312
1413 let f = |_: ...| { } ;
1514 //~^ ERROR C-variadic type `...` may not be nested inside another type
Original file line number Diff line number Diff line change @@ -10,26 +10,14 @@ error: unexpected `...`
1010LL | let f = |...| {};
1111 | ^^^ not a valid pattern
1212 |
13- help: for a rest pattern, use `..` instead of `...`
14- |
15- LL - let f = |...| {};
16- LL + let f = |..| {};
17- |
13+ = note: C-variadic type `...` is not allowed here
1814
1915error[E0743]: C-variadic type `...` may not be nested inside another type
20- --> $DIR/no-closure.rs:14 :17
16+ --> $DIR/no-closure.rs:13 :17
2117 |
2218LL | let f = |_: ...| {};
2319 | ^^^
2420
25- error: `..` patterns are not allowed here
26- --> $DIR/no-closure.rs:10:14
27- |
28- LL | let f = |...| {};
29- | ^^^
30- |
31- = note: only allowed in tuple, tuple struct, and slice patterns
32-
33- error: aborting due to 4 previous errors
21+ error: aborting due to 3 previous errors
3422
3523For more information about this error, try `rustc --explain E0743`.
You can’t perform that action at this time.
0 commit comments