about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-06-22 18:45:27 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2015-06-22 21:53:30 +0200
commitccb459e49aa52ba55a59520d49350f05a7c9a0db (patch)
treee684aa3afad79bc634a03d0097c689d04ac227a2
parent11f0f4722027272319a556528a9000ca67e9b35a (diff)
downloadrust-ccb459e49aa52ba55a59520d49350f05a7c9a0db.tar.gz
rust-ccb459e49aa52ba55a59520d49350f05a7c9a0db.zip
Change description of error (thanks @Manisheart)
-rw-r--r--src/librustc_typeck/diagnostics.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index ee3200051ab..67ccdb881c1 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -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 @@ extern "rust-call" { fn foo(x: u8, ...); }
 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, ...);
+}
 ```
 "##,