Skip to content

Commit ca1a81d

Browse files
committed
Fix small sentence about references
Thanks Eric, reported via email
1 parent a7d63fd commit ca1a81d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ We can’t modify `v` because it’s borrowed by the loop.
298298

299299
### use after free
300300

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

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

0 commit comments

Comments
 (0)