]> git.lizzy.rs Git - rust.git/commitdiff
Improved example in the Guide
authorAdolfo Ochagavía <aochagavia92@gmail.com>
Sat, 5 Jul 2014 16:12:46 +0000 (18:12 +0200)
committerAdolfo Ochagavía <aochagavia92@gmail.com>
Sat, 5 Jul 2014 16:19:08 +0000 (18:19 +0200)
Fixes https://github.com/rust-lang/rust/issues/15452

src/doc/guide.md

index dc9608563e176c08190d8ccd865c2037539837f6..46b4036cdcc4f19518f698f94957069703dd5c2a 100644 (file)
@@ -737,10 +737,10 @@ let x = (let y = 5i); // found `let` in ident position
 The compiler is telling us here that it was expecting to see the beginning of
 an expression, and a `let` can only begin a statement, not an expression.
 
-However, re-assigning to a mutable binding is an expression:
+However, assigning to a variable binding is an expression:
 
 ```{rust}
-let mut x = 0i;
+let x;
 let y = x = 5i;
 ```