about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-23 16:15:58 +0000
committerbors <bors@rust-lang.org>2014-08-23 16:15:58 +0000
commit3e3209ab4a7e256730d7c6733f2d800a5dbfdaef (patch)
tree14b28822798dbe6aecea66bca94a6c6a0945684c /src
parent6843d8ccd562c5c5d45c0bba570908d5aa765610 (diff)
parent1777047a547cbd16d9638c22db1d3001a778c732 (diff)
downloadrust-3e3209ab4a7e256730d7c6733f2d800a5dbfdaef.tar.gz
rust-3e3209ab4a7e256730d7c6733f2d800a5dbfdaef.zip
auto merge of #16268 : cakebaker/rust/make_fn_add_three_times_four_public, r=steveklabnik
To avoid a compilation error when running the tests the function has to be public.
Diffstat (limited to 'src')
-rw-r--r--src/doc/guide.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/guide.md b/src/doc/guide.md
index d011c9932fa..f1211c0788e 100644
--- a/src/doc/guide.md
+++ b/src/doc/guide.md
@@ -3325,7 +3325,8 @@ To do that, we'll need to make a new module. Make a new file, `src/lib.rs`,
 and put this in it:
 
 ```{rust}
-fn add_three_times_four(x: int) -> int {
+# fn main() {}
+pub fn add_three_times_four(x: int) -> int {
     (x + 3) * 4
 }
 ```