Add a reference now that ownership discusses scope

This now isn't the first time you should have seen this if you're
reading in order.
This commit is contained in:
Carol (Nichols || Goulding) 2016-07-18 21:33:18 -04:00
parent 679475e784
commit 5b94ec1bb6

View File

@ -209,9 +209,9 @@ Using `mut`, we change the value that `x` binds to from `5` to `6`.
### Variable Binding Scope
Another important thing to know about variable bindings is that they are only
valid as long as they are *in scope*. That scope begins at the point where the
binding is declared, and ends with the curly brace that closes the block of
As we discussed in the ownership section of Chapter XX, variable bindings are
only valid as long as they are *in scope*. That scope begins at the point where
the binding is declared and ends with the curly brace that closes the block of
code containing that binding. We cannot access bindings "before they come into
scope" or "after they go out of scope." Heres an example to illustrate this: