Folkert de Vries
01e83adc88
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.
2025-09-11 10:27:28 +02:00
Folkert de Vries
fd48528d18
c-variadic: allow inherent methods to be c-variadic
2025-09-11 10:18:48 +02:00
Folkert de Vries
9196844f0d
c-variadic: reject functions with unsupported extern ABI
2025-09-09 21:38:38 +02:00
Folkert de Vries
0c96200f26
c-variadic: reject non-unsafe functions
2025-09-09 21:30:38 +02:00
Folkert de Vries
2b9fce8c8c
c-variadic: reject non-extern functions
2025-09-08 19:18:21 +02:00
Folkert de Vries
a093372e5e
disallow c-variadic associated functions (for now)
...
there is no reason this should not work, really, we're just cutting some scope for now
2025-09-08 18:41:22 +02:00
Folkert de Vries
8d11719e6c
simplify check_c_variadic_type
2025-09-03 18:35:00 +02:00
Ralf Jung
f6d55aea2c
stabilize extended_varargs_abi_support
2025-09-02 08:48:12 +02:00
Jubilee Young
43a6b018a2
compiler: Mention C-unwind in C-variadic error
2024-06-22 23:30:31 -07:00
Veera
62a104df98
Update Tests
2024-04-16 18:15:37 -04:00
Oli Scherer
eab2adb660
Continue to borrowck even if there were previous errors
2024-02-08 08:10:43 +00:00
Nicholas Bishop
f91b5ceaf2
Explicitly reject const C-variadic functions
...
Trying to use C-variadics in a const function would previously fail with
an error like "destructor of `VaListImpl<'_>` cannot be evaluated at
compile-time".
Add an explicit check for const C-variadics to provide a clearer error:
"functions cannot be both `const` and C-variadic".
2023-10-30 10:38:25 -04:00
Nicholas Bishop
8508e65895
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.
2023-10-30 10:29:11 -04:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests
2023-01-11 09:32:08 +00:00