@@ -380,6 +380,28 @@ fn main() {
380
380
```
381
381
"## ,
382
382
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
+
383
405
E0046 : r##"
384
406
When trying to make some type implement a trait `Foo`, you must, at minimum,
385
407
provide 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
1467
1489
1468
1490
register_diagnostics ! {
1469
1491
E0044 , // foreign items may not have type parameters
1470
- E0045 , // variadic function must have C calling convention
1471
1492
E0068 ,
1472
1493
E0071 ,
1473
1494
E0074 ,
@@ -1535,7 +1556,8 @@ register_diagnostics! {
1535
1556
E0219 , // associated type defined in higher-ranked supertrait
1536
1557
E0220 , // associated type not found for type parameter
1537
1558
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
1539
1561
E0223 , // ambiguous associated type
1540
1562
E0224 , // at least one non-builtin train is required for an object type
1541
1563
E0225 , // only the builtin traits can be used as closure or object bounds
0 commit comments