about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2013-12-06 01:26:49 -0500
committerCorey Richardson <corey@octayn.net>2013-12-10 07:28:24 -0500
commit8a8cccd4b60d85498c99c14141a1dab1c9e5cf5a (patch)
tree6aeed6cf533fbdeebdb2c5f4ce22d13b9f034f08 /doc
parente5f20212028fd6cb5161dbb2c0f14c9d94f1caea (diff)
downloadrust-8a8cccd4b60d85498c99c14141a1dab1c9e5cf5a.tar.gz
rust-8a8cccd4b60d85498c99c14141a1dab1c9e5cf5a.zip
Explain potentially confusing string example.
Reported be @ElBaha
Diffstat (limited to 'doc')
-rw-r--r--doc/tutorial.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md
index 58bfd047d95..dee1f1334ef 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -207,14 +207,15 @@ let hi = "hi";
 let mut count = 0;
 
 while count < 10 {
-    println!("count: {}", count);
+    println!("count is {}", count);
     count += 1;
 }
 ~~~~
 
-Although Rust can almost always infer the types of local variables, you
-can specify a variable's type by following it with a colon, then the type
-name. Static items, on the other hand, always require a type annotation.
+Although Rust can almost always infer the types of local variables, you can
+specify a variable's type by following it in the `let` with a colon, then the
+type name. Static items, on the other hand, always require a type annotation.
+
 
 ~~~~
 static MONSTER_FACTOR: f64 = 57.8;