Skip to content

Commit 06d8b21

Browse files
committed
docs: Correct an improper description
In the example, we made a immutable borrow to `println!`, not a mutable one.
1 parent 015d3b7 commit 06d8b21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ fn main() {
212212

213213
In other words, the mutable borrow is held through the rest of our example. What
214214
we want is for the mutable borrow by `y` to end so that the resource can be
215-
returned to the owner, `x`. `x` can then provide a mutable borrow to `println!`.
215+
returned to the owner, `x`. `x` can then provide a immutable borrow to `println!`.
216216
In Rust, borrowing is tied to the scope that the borrow is valid for. And our
217217
scopes look like this:
218218

0 commit comments

Comments
 (0)