about summary refs log tree commit diff
path: root/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
diff options
context:
space:
mode:
authorNicholas Bishop <nbishop@nbishop.net>2023-10-29 17:04:52 -0400
committerNicholas Bishop <nbishop@nbishop.net>2023-10-30 10:29:11 -0400
commit8508e658958d02bc0c4bb62646a9cf9098ee53a8 (patch)
treeaed6ea8d1a7fdd2a99dd082086c81aeb580f8fe2 /tests/ui/parser/variadic-ffi-semantic-restrictions.rs
parentec2b311914a4880235862f3cd65fe24e92e6d3a5 (diff)
downloadrust-8508e658958d02bc0c4bb62646a9cf9098ee53a8.tar.gz
rust-8508e658958d02bc0c4bb62646a9cf9098ee53a8.zip
Fix bad-c-variadic error being emitted multiple times
If a function incorrectly contains multiple `...` args, and is also not
foreign or `unsafe extern "C"`, only emit the latter error once.
Diffstat (limited to 'tests/ui/parser/variadic-ffi-semantic-restrictions.rs')
-rw-r--r--tests/ui/parser/variadic-ffi-semantic-restrictions.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
index 0b61e267da8..8e382314ca2 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
@@ -49,11 +49,9 @@ impl X {
     //~| ERROR C-variadic function must be declared with at least one named argument
     fn i_f3(..., x: isize, ...) {}
     //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
-    //~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
     //~| ERROR `...` must be the last argument of a C-variadic function
     fn i_f4(..., x: isize, ...) {}
     //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
-    //~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
     //~| ERROR `...` must be the last argument of a C-variadic function
 }