Skip to content

Commit 078b288

Browse files
committed
Rollup merge of rust-lang#32373 - tclfs:patch-5, r=steveklabnik
docs: Correct an improper description In the example, we made a immutable borrow to `println!`, not a mutable one.
2 parents 3c3b9ad + 06d8b21 commit 078b288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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)