]> git.lizzy.rs Git - rust.git/commitdiff
docs: Correct an improper description
authorTang Chenglong <ideami@outlook.com>
Sun, 20 Mar 2016 13:24:46 +0000 (21:24 +0800)
committerTang Chenglong <ideami@outlook.com>
Sun, 20 Mar 2016 13:24:46 +0000 (21:24 +0800)
In the example, we made a immutable borrow to `println!`, not a mutable one.

src/doc/book/references-and-borrowing.md

index 74983c1255333b844c2a071a0632eb210433f914..a08d53f958ba3eddcaa139646e7df4ef91f4f06a 100644 (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: