diff options
| author | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-05 18:12:46 +0200 |
|---|---|---|
| committer | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-05 18:19:08 +0200 |
| commit | d6f8271602e15bf912f035fbe10bb98bcc83abd7 (patch) | |
| tree | d14451b84f03e538635b2b78e51cd8c6d0443ac6 | |
| parent | e0d3cf6b2a1db489520712f7e0a47874176c35de (diff) | |
| download | rust-d6f8271602e15bf912f035fbe10bb98bcc83abd7.tar.gz rust-d6f8271602e15bf912f035fbe10bb98bcc83abd7.zip | |
Improved example in the Guide
Fixes https://github.com/rust-lang/rust/issues/15452
| -rw-r--r-- | src/doc/guide.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/guide.md b/src/doc/guide.md index dc9608563e1..46b4036cdcc 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -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; ``` |
