diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-09-10 17:53:41 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-09-11 10:27:28 +0200 |
| commit | 01e83adc88653123fee444fdb930c16dd08da82d (patch) | |
| tree | 625bc04a4365df1e7b897a2355d65ccfe8958b6c /tests/ui/parser/variadic-ffi-semantic-restrictions.rs | |
| parent | fd48528d185f59f60e301bce1e01d670ff4bdb30 (diff) | |
| download | rust-01e83adc88653123fee444fdb930c16dd08da82d.tar.gz rust-01e83adc88653123fee444fdb930c16dd08da82d.zip | |
c-variadic: allow trait methods to be c-variadic
but a C-variadic method makes a trait dyn-incompatible. That is because methods from dyn traits, when cast to a function pointer, create a shim. That shim can't really forward the c-variadic arguments.
Diffstat (limited to 'tests/ui/parser/variadic-ffi-semantic-restrictions.rs')
| -rw-r--r-- | tests/ui/parser/variadic-ffi-semantic-restrictions.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs index 566c4d30245..415472176d9 100644 --- a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs +++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs @@ -70,13 +70,13 @@ impl X { trait T { fn t_f1(x: isize, ...) {} - //~^ ERROR associated functions cannot have a C variable argument list + //~^ ERROR `...` is not supported for non-extern functions fn t_f2(x: isize, ...); - //~^ ERROR associated functions cannot have a C variable argument list + //~^ ERROR `...` is not supported for non-extern functions fn t_f3(...) {} - //~^ ERROR associated functions cannot have a C variable argument list + //~^ ERROR `...` is not supported for non-extern functions fn t_f4(...); - //~^ ERROR associated functions cannot have a C variable argument list + //~^ ERROR `...` is not supported for non-extern functions fn t_f5(..., x: isize) {} //~^ ERROR `...` must be the last argument of a C-variadic function fn t_f6(..., x: isize); |
