File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -381,19 +381,24 @@ fn main() {
381381"## ,
382382
383383E0045 : r##"
384- Variadic parameters are only allowed in extern "C" code. Examples of
385- erroneous code:
384+ Rust only supports variadic parameters for interoperability with C code in its
385+ FFI. As such, variadic parameters can only be used with functions which are
386+ using the C ABI. Examples of erroneous code:
386387
387388```
388389extern "rust-call" { fn foo(x: u8, ...); }
389390// or
390391fn foo(x: u8, ...) {}
391392```
392393
393- To fix such code, put them in extern "C" block:
394+ To fix such code, put them in an extern "C" block:
394395
395396```
396397extern "C" fn foo (x: u8, ...);
398+ // or:
399+ extern "C" {
400+ fn foo (x: u8, ...);
401+ }
397402```
398403"## ,
399404
You can’t perform that action at this time.
0 commit comments