summaryrefslogtreecommitdiffstats
path: root/src/test/ui/c-variadic/issue-32201.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/c-variadic/issue-32201.rs')
-rw-r--r--src/test/ui/c-variadic/issue-32201.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/c-variadic/issue-32201.rs b/src/test/ui/c-variadic/issue-32201.rs
new file mode 100644
index 000000000..f27bb1c2e
--- /dev/null
+++ b/src/test/ui/c-variadic/issue-32201.rs
@@ -0,0 +1,13 @@
+extern "C" {
+ fn foo(a: i32, ...);
+}
+
+fn bar(_: *const u8) {}
+
+fn main() {
+ unsafe {
+ foo(0, bar);
+ //~^ ERROR can't pass `fn(*const u8) {bar}` to variadic function
+ //~| HELP cast the value to `fn(*const u8)`
+ }
+}