diff options
Diffstat (limited to 'src/test/pretty/fn-variadic.rs')
-rw-r--r-- | src/test/pretty/fn-variadic.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/pretty/fn-variadic.rs b/src/test/pretty/fn-variadic.rs new file mode 100644 index 000000000..59e477cfa --- /dev/null +++ b/src/test/pretty/fn-variadic.rs @@ -0,0 +1,15 @@ +// Check that `fn foo(x: i32, ...)` does not print as `fn foo(x: i32, ..., ...)`. +// See issue #58853. + +// pp-exact +#![feature(c_variadic)] + +extern "C" { + pub fn foo(x: i32, ...); +} + +pub unsafe extern "C" fn bar(_: i32, mut ap: ...) -> usize { + ap.arg::<usize>() +} + +fn main() {} |