f7cabc6550
When encountering a variadic argument in a function definition that doesn't accept it, if immediately after there's a closing paren, continue parsing as normal. Otherwise keep current behavior of emitting error and stopping.
15 lines
444 B
Plaintext
15 lines
444 B
Plaintext
error: only foreign functions are allowed to be variadic
|
|
--> $DIR/invalid-variadic-function.rs:11:26
|
|
|
|
|
11 | extern "C" fn foo(x: u8, ...);
|
|
| ^^^
|
|
|
|
error: expected one of `->`, `where`, or `{`, found `;`
|
|
--> $DIR/invalid-variadic-function.rs:11:30
|
|
|
|
|
11 | extern "C" fn foo(x: u8, ...);
|
|
| ^ expected one of `->`, `where`, or `{` here
|
|
|
|
error: aborting due to 2 previous errors
|
|
|