From ca1a81df2388484ec6005b7c6ba8ba953c450bc7 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Tue, 8 Sep 2015 09:33:53 -0400 Subject: [PATCH] Fix small sentence about references Thanks Eric, reported via email --- src/doc/trpl/references-and-borrowing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/trpl/references-and-borrowing.md b/src/doc/trpl/references-and-borrowing.md index a7a77539f7958..0d27e99eae820 100644 --- a/src/doc/trpl/references-and-borrowing.md +++ b/src/doc/trpl/references-and-borrowing.md @@ -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: