]> git.lizzy.rs Git - rust.git/commitdiff
Change description of error (thanks @Manisheart)
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2015 16:45:27 +0000 (18:45 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2015 19:53:30 +0000 (21:53 +0200)
src/librustc_typeck/diagnostics.rs

index ee3200051abf746e250ef5f7c02b3c73a46d5976..67ccdb881c1b797aaf94f6b7676ecddc4e9104d9 100644 (file)
@@ -381,8 +381,9 @@ fn main() {
 "##,
 
 E0045: r##"
-Variadic parameters are only allowed in extern "C" code. Examples of
-erroneous code:
+Rust only supports variadic parameters for interoperability with C code in its
+FFI. As such, variadic parameters can only be used with functions which are
+using the C ABI. Examples of erroneous code:
 
 ```
 extern "rust-call" { fn foo(x: u8, ...); }
@@ -390,10 +391,14 @@ fn main() {
 fn foo(x: u8, ...) {}
 ```
 
-To fix such code, put them in extern "C" block:
+To fix such code, put them in an extern "C" block:
 
 ```
 extern "C" fn foo (x: u8, ...);
+// or:
+extern "C" {
+    fn foo (x: u8, ...);
+}
 ```
 "##,