about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Necio <MichaelNecio@users.noreply.github.com>2016-06-06 18:13:20 -0400
committerMichael Necio <MichaelNecio@users.noreply.github.com>2016-06-06 18:13:20 -0400
commitf07aa355495ee4028ea3a3513737f90f9f4146e1 (patch)
treecee28158cfd2c95953e65b9fdaeabfea3c12db18
parent763f9234b052c7911dc4cf952a81a85c51c57784 (diff)
downloadrust-f07aa355495ee4028ea3a3513737f90f9f4146e1.tar.gz
rust-f07aa355495ee4028ea3a3513737f90f9f4146e1.zip
Noted that shadowing never destroys a value
-rw-r--r--src/doc/book/variable-bindings.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/doc/book/variable-bindings.md b/src/doc/book/variable-bindings.md
index 1c8c03cf679..9923077a518 100644
--- a/src/doc/book/variable-bindings.md
+++ b/src/doc/book/variable-bindings.md
@@ -240,7 +240,10 @@ println!("{}", x); // Prints "42"
 Shadowing and mutable bindings may appear as two sides of the same coin, but
 they are two distinct concepts that can't always be used interchangeably. For
 one, shadowing enables us to rebind a name to a value of a different type. It
-is also possible to change the mutability of a binding.
+is also possible to change the mutability of a binding. Note that shadowing a 
+name does not alter or destroy the value it was bound to, and the value will
+continue to exist until it goes out of scope, even if it is no longer accessible
+by any means.
 
 ```rust
 let mut x: i32 = 1;