about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2021-12-27 23:18:17 -0500
committerJack Huey <31162821+jackh726@users.noreply.github.com>2021-12-28 12:58:31 -0500
commitbbb8bde98939db872e2b6092c0bf0c97f23e9da2 (patch)
tree60a9a908b0a7679c2d593fe9a83561d15c6a65aa /src
parent555119fa146640c24104e79ec32beeec9d5f738a (diff)
downloadrust-bbb8bde98939db872e2b6092c0bf0c97f23e9da2.tar.gz
rust-bbb8bde98939db872e2b6092c0bf0c97f23e9da2.zip
Slight cleanup
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/c-variadic/variadic-unreachable-arg-error.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/c-variadic/variadic-unreachable-arg-error.rs b/src/test/ui/c-variadic/variadic-unreachable-arg-error.rs
new file mode 100644
index 00000000000..f60f6f3e808
--- /dev/null
+++ b/src/test/ui/c-variadic/variadic-unreachable-arg-error.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+#![feature(c_variadic)]
+
+extern "C" {
+    fn foo(f: isize, x: u8, ...);
+}
+
+fn main() {
+    unsafe {
+        // FIXME: Ideally we could give an unreachable warning
+        foo(1, loop {}, 1usize);
+    }
+}