Skip to content

Commit a84c8de

Browse files
committed
Fix existing test
1 parent 0e290e4 commit a84c8de

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

tests/ui/c-variadic/no-closure.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ const F: extern "C" fn(...) = |_: ...| {};
88

99
fn 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

tests/ui/c-variadic/no-closure.stderr

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,14 @@ error: unexpected `...`
1010
LL | 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

1915
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
2117
|
2218
LL | 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

3523
For more information about this error, try `rustc --explain E0743`.

0 commit comments

Comments
 (0)