rust/src/test/ui/invalid-variadic-function.stderr
Esteban Küber f7cabc6550 Continue parsing function after finding ... arg
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.
2018-02-11 22:10:35 -08:00

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