-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imported variadic functions passed to procedural macros incorrectly #58853
Comments
@alexcrichton I'll start looking into this ASAP |
FWIW the cause of the extra |
When adding the following to extern "C" {
pub fn foo(x: i32, ...);
} I get the following
Which looks correct. Am I missing something? |
@dlrobertson oh I think you may be triggering syn's string parsing code, to see this in action you can use this gist, where after cloning and executing
|
@alexcrichton Thanks for the example! I'm pretty sure the offending code is src/libsyntax/print/pprust.rs:2817-2819. My PR should have cut that chunk. |
Fix C-variadic function printing There is no longer a need to append the string `", ..."` to a functions args as `...` is parsed as an argument and will appear in the functions arguments. r? @alexreg cc @alexcrichton Fixes: rust-lang#58853
Fix C-variadic function printing There is no longer a need to append the string `", ..."` to a functions args as `...` is parsed as an argument and will appear in the functions arguments. Fixes: rust-lang#58853
In the most recent nightly (I think #57760 was likely the cause), some input to a macro like this:
will actually pass the following as input to the macro:
which then fails to parse in libraries like
syn
!The text was updated successfully, but these errors were encountered: