Skip to content

Commit adeef74

Browse files
Mention Variadics With No Fixed Parameter
There's an open PR to support C23's variadics without a named parameter in Rust's extern blocks. Currently, it's waiting on approval from T-lang to get merged. This PR removes the line "There must be at least one parameter before the variadic parameter" and adds an example to highlight that we support variadics without any named parameters. Opening this now so it can get merged after the implementation gets approved by T-lang.
1 parent 735c5db commit adeef74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/items/external-blocks.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ There are also some platform-specific ABI strings:
9797
## Variadic functions
9898

9999
Functions within external blocks may be variadic by specifying `...` as the
100-
last argument. There must be at least one parameter before the variadic
101-
parameter. The variadic parameter may optionally be specified with an
100+
last argument. The variadic parameter may optionally be specified with an
102101
identifier.
103102

104103
```rust
105104
extern "C" {
106-
fn foo(x: i32, ...);
105+
fn foo(...);
106+
fn bar(x: i32, ...);
107107
fn with_name(format: *const u8, args: ...);
108108
}
109109
```

0 commit comments

Comments
 (0)