Skip to content

Commit

Permalink
Ch. 4: Rephrase/clarify paragraph on reference scope (#3688)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Krycho <hello@chriskrycho.com>
  • Loading branch information
DreadedHippy and chriskrycho authored Dec 12, 2024
1 parent a5ccba9 commit c9820ad
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 @@ -173,8 +173,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 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 c9820ad

Please sign in to comment.