about summary refs log tree commit diff
path: root/tests/ui/c-variadic/not-async.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/c-variadic/not-async.rs')
-rw-r--r--tests/ui/c-variadic/not-async.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/c-variadic/not-async.rs b/tests/ui/c-variadic/not-async.rs
new file mode 100644
index 00000000000..45a7e1f8972
--- /dev/null
+++ b/tests/ui/c-variadic/not-async.rs
@@ -0,0 +1,7 @@
+//@ edition: 2021
+#![feature(c_variadic)]
+#![crate_type = "lib"]
+
+async unsafe extern "C" fn cannot_be_async(x: isize, ...) {}
+//~^ ERROR functions cannot be both `async` and C-variadic
+//~| ERROR hidden type for `impl Future<Output = ()>` captures lifetime that does not appear in bounds