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(...) = |_: ...| {};
8
8
9
9
fn foo ( ) {
10
10
let f = |... | { } ;
11
- //~^ ERROR: `..` patterns are not allowed here
12
- //~| ERROR: unexpected `...`
11
+ //~^ ERROR: unexpected `...`
13
12
14
13
let f = |_: ...| { } ;
15
14
//~^ 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 `...`
10
10
LL | let f = |...| {};
11
11
| ^^^ not a valid pattern
12
12
|
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
18
14
19
15
error[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
21
17
|
22
18
LL | let f = |_: ...| {};
23
19
| ^^^
24
20
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
34
22
35
23
For more information about this error, try `rustc --explain E0743`.
You can’t perform that action at this time.
0 commit comments