@@ -380,6 +380,28 @@ fn main() {
380380```
381381"## ,
382382
383+ E0045 : r##"
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:
387+
388+ ```
389+ extern "rust-call" { fn foo(x: u8, ...); }
390+ // or
391+ fn foo(x: u8, ...) {}
392+ ```
393+
394+ To fix such code, put them in an extern "C" block:
395+
396+ ```
397+ extern "C" fn foo (x: u8, ...);
398+ // or:
399+ extern "C" {
400+ fn foo (x: u8, ...);
401+ }
402+ ```
403+ "## ,
404+
383405E0046 : r##"
384406When trying to make some type implement a trait `Foo`, you must, at minimum,
385407provide implementations for all of `Foo`'s required methods (meaning the
@@ -1467,7 +1489,6 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
14671489
14681490register_diagnostics ! {
14691491 E0044 , // foreign items may not have type parameters
1470- E0045 , // variadic function must have C calling convention
14711492 E0068 ,
14721493 E0071 ,
14731494 E0074 ,
@@ -1535,7 +1556,8 @@ register_diagnostics! {
15351556 E0219 , // associated type defined in higher-ranked supertrait
15361557 E0220 , // associated type not found for type parameter
15371558 E0221 , // ambiguous associated type in bounds
1538- E0222 , // variadic function must have C calling convention
1559+ //E0222, // Error code E0045 (variadic function must have C calling
1560+ // convention) duplicate
15391561 E0223 , // ambiguous associated type
15401562 E0224 , // at least one non-builtin train is required for an object type
15411563 E0225 , // only the builtin traits can be used as closure or object bounds
0 commit comments