about summary refs log tree commit diff
path: root/src/doc/rust.md
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-06 02:56:39 -0700
committerbors <bors@rust-lang.org>2014-04-06 02:56:39 -0700
commitf1f50565a1fda0dfd60d89fea65e2328f42cc5e0 (patch)
treec6afc2ec113c761b4a284e1370f00f29155f7025 /src/doc/rust.md
parent667f82a79b2275a696b21086ddf5148a617fe20a (diff)
parent38f7a1b41b0ff9c1bcaec9a892c8ffb64ad6139f (diff)
downloadrust-f1f50565a1fda0dfd60d89fea65e2328f42cc5e0.tar.gz
rust-f1f50565a1fda0dfd60d89fea65e2328f42cc5e0.zip
auto merge of #13315 : alexcrichton/rust/libc, r=alexcrichton,me
Rebasing of #12526 with a very obscure bug fixed on windows.
Diffstat (limited to 'src/doc/rust.md')
-rw-r--r--src/doc/rust.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md
index 1e1278f08bb..afb21a19965 100644
--- a/src/doc/rust.md
+++ b/src/doc/rust.md
@@ -1471,11 +1471,13 @@ with the exception that they may not have a body
 and are instead terminated by a semicolon.
 
 ~~~~
-# use std::libc::{c_char, FILE};
+extern crate libc;
+use libc::{c_char, FILE};
 
 extern {
     fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
 }
+# fn main() {}
 ~~~~
 
 Functions within external blocks may be called by Rust code,