about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Burka <durka42+github@gmail.com>2016-06-13 21:10:12 -0400
committerAlex Burka <aburka@seas.upenn.edu>2016-07-27 13:58:51 -0400
commitfae33352721c4b4d6fbdc66520043ae721121d77 (patch)
treee10733e972ad29d512b6b883f8cbd4f4ce578f49
parent1cceca8dfdda4a8bf3daa6a8c23adf7f23acd81a (diff)
downloadrust-fae33352721c4b4d6fbdc66520043ae721121d77.tar.gz
rust-fae33352721c4b4d6fbdc66520043ae721121d77.zip
extern fns require named parameters
Not sure the example is going to stay, but I can try to pass Travis for the bragging rights.
-rw-r--r--src/doc/book/ffi.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/book/ffi.md b/src/doc/book/ffi.md
index 4a55db38d38..74c99273fa2 100644
--- a/src/doc/book/ffi.md
+++ b/src/doc/book/ffi.md
@@ -600,7 +600,7 @@ use std::os::raw::c_int;
 
 extern "C" {
     /// Register the callback.
-    fn register(Option<extern "C" fn(Option<extern "C" fn(c_int) -> c_int>, c_int) -> c_int>);
+    fn register(cb: Option<extern "C" fn(Option<extern "C" fn(c_int) -> c_int>, c_int) -> c_int>);
 }
 
 /// This fairly useless function receives a function pointer and an integer