We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a84bb32 commit d28c31aCopy full SHA for d28c31a
tests/ui/explicit-tail-calls/c-variadic.rs
@@ -0,0 +1,14 @@
1
+#![expect(incomplete_features)]
2
+#![feature(c_variadic, explicit_tail_calls)]
3
+#![allow(unused)]
4
+
5
+unsafe extern "C" fn foo(mut ap: ...) -> u32 {
6
+ ap.arg::<u32>()
7
+}
8
9
+extern "C" fn bar() -> u32 {
10
+ unsafe { become foo(1, 2, 3) }
11
+ //~^ ERROR c-variadic functions can't be tail-called
12
13
14
+fn main() {}
tests/ui/explicit-tail-calls/c-variadic.stderr
@@ -0,0 +1,8 @@
+error: c-variadic functions can't be tail-called
+ --> $DIR/c-variadic.rs:10:14
+ |
+LL | unsafe { become foo(1, 2, 3) }
+ | ^^^^^^^^^^^^^^^^^^^
+error: aborting due to 1 previous error
0 commit comments