about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2019-03-03 13:56:57 +0800
committerkennytm <kennytm@gmail.com>2019-03-03 13:56:57 +0800
commit946e670bce9f1e123dffce485fc979a96edbb0b8 (patch)
treeec62a39d585d23dc5f6b7aa794c4f11e89b0af28 /src/libsyntax
parentc835a0a94db7e68a57b6449497f74cf2f74c0256 (diff)
parent379cd29d1c9ce06aa48fdd49208cfd7ffd3e5c07 (diff)
downloadrust-946e670bce9f1e123dffce485fc979a96edbb0b8.tar.gz
rust-946e670bce9f1e123dffce485fc979a96edbb0b8.zip
Rollup merge of #58865 - dlrobertson:fix-varargs, r=alexreg
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: #58853
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/print/pprust.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 942bd969391..49e3fad4af0 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -2814,9 +2814,6 @@ impl<'a> State<'a> {
         -> io::Result<()> {
         self.popen()?;
         self.commasep(Inconsistent, &decl.inputs, |s, arg| s.print_arg(arg, false))?;
-        if decl.c_variadic {
-            self.s.word(", ...")?;
-        }
         self.pclose()?;
 
         self.print_fn_output(decl)