docs: Correct an improper description

In the example, we made a immutable borrow to `println!`, not a mutable one.
This commit is contained in:
Tang Chenglong 2016-03-20 21:24:46 +08:00
parent 015d3b7092
commit 06d8b21372

View File

@ -212,7 +212,7 @@ fn main() {
In other words, the mutable borrow is held through the rest of our example. What
we want is for the mutable borrow by `y` to end so that the resource can be
returned to the owner, `x`. `x` can then provide a mutable borrow to `println!`.
returned to the owner, `x`. `x` can then provide a immutable borrow to `println!`.
In Rust, borrowing is tied to the scope that the borrow is valid for. And our
scopes look like this: