about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDerecho <derecho@sector5d.org>2014-07-02 10:53:30 +0200
committerDerecho <derecho@sector5d.org>2014-07-02 10:53:30 +0200
commitc85d42a3054e2859aac67b143485f6cd8a0693e9 (patch)
tree3a854b54212817d76a47acaf6c11f8c7f566eb19 /src
parent89259b34c04aff7052dd122552fac3070c830f4f (diff)
downloadrust-c85d42a3054e2859aac67b143485f6cd8a0693e9.tar.gz
rust-c85d42a3054e2859aac67b143485f6cd8a0693e9.zip
Fix example in docs on documentation
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustdoc.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustdoc.md b/src/doc/rustdoc.md
index 8199eaea82c..07a93e58456 100644
--- a/src/doc/rustdoc.md
+++ b/src/doc/rustdoc.md
@@ -51,7 +51,7 @@ Calculates the factorial of a number.
 
 Given the input integer `n`, this function will calculate `n!` and return it.
 "]
-pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n)} }
+pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n - 1)} }
 # fn main() {}
 ~~~