]> git.lizzy.rs Git - rust.git/commitdiff
Add E0045 error explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2015 16:39:25 +0000 (18:39 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2015 16:39:25 +0000 (18:39 +0200)
src/librustc_typeck/diagnostics.rs

index 725bd1d4e0855fee96fef2d68e22385b60f19732..44c6be01ee9f75277f8b9d86c37dea7e6403c536 100644 (file)
@@ -380,6 +380,23 @@ fn main() {
 ```
 "##,
 
+E0045: r##"
+Variadic parameters are only allowed in extern "C" code. Example of
+erroneous codes:
+
+```
+extern "rust-call" { fn foo(x: u8, ...); }
+// or
+fn foo(x: u8, ...) {}
+```
+
+To fix these codes, put them in extern "C" block:
+
+```
+extern "C" { fn foo(x: u8, ...); }
+```
+"##,
+
 E0046: r##"
 When trying to make some type implement a trait `Foo`, you must, at minimum,
 provide implementations for all of `Foo`'s required methods (meaning the
@@ -1467,7 +1484,6 @@ impl Baz for Bar { } // Note: This is OK
 
 register_diagnostics! {
     E0044, // foreign items may not have type parameters
-    E0045, // variadic function must have C calling convention
     E0068,
     E0071,
     E0074,