Skip to content

Commit

Permalink
Ch. 4: further clarify paragraph about reference scope
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Dec 12, 2024
1 parent 88b467c commit 53bc057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ch04-02-references-and-borrowing.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ reading of the data.

Note that a reference’s scope starts from where it is introduced and continues
through the last time that reference is used. For instance, this code will
compile because at the last usage of the immutable references, the `println!`,
occurs before the mutable reference is introduced:
compile because the last usage of the immutable references is in the `println!`,
before the mutable reference is introduced:

```rust,edition2021
{{#rustdoc_include ../listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs:here}}
Expand Down

0 comments on commit 53bc057

Please sign in to comment.