Skip to content

Commit

Permalink
Fix small sentence about references
Browse files Browse the repository at this point in the history
Thanks Eric, reported via email
  • Loading branch information
steveklabnik committed Sep 8, 2015
1 parent a7d63fd commit ca1a81d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/trpl/references-and-borrowing.md
Expand Up @@ -298,8 +298,8 @@ We can’t modify `v` because it’s borrowed by the loop.

### use after free

References must live as long as the resource they refer to. Rust will check the
scopes of your references to ensure that this is true.
References must not live longer than the resource they refer to. Rust will
check the scopes of your references to ensure that this is true.

If Rust didn’t check this property, we could accidentally use a reference
which was invalid. For example:
Expand Down

0 comments on commit ca1a81d

Please sign in to comment.