From de7e647403c07b96f643b6818b1bdb70358f363a Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 28 Jan 2016 18:09:13 -0500 Subject: [PATCH] small fixes --- src/references-and-borrowing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/references-and-borrowing.md b/src/references-and-borrowing.md index 42d1770fb..a25ef77ab 100644 --- a/src/references-and-borrowing.md +++ b/src/references-and-borrowing.md @@ -215,10 +215,10 @@ from under them! Multiple immutable references are okay, however. ## Dangling references -In languages with pointers, it’s easy to crate a “dangling pointer” by freeing +In languages with pointers, it’s easy to create a “dangling pointer” by freeing some memory while keeping around a pointer to that memory. In Rust, by contrast, the compiler guarantees that references will never be dangling: if we -have a reference the something, the compiler will ensure that it will not go +have a reference to something, the compiler will ensure that it will not go out of scope before the reference does. Let’s try to create a dangling reference: