Merge pull request #346 from lukezaparaniuk/patch-1

Corrected Drop trait code representation on line 450
This commit is contained in:
Carol (Nichols || Goulding)
2016-12-05 10:46:07 -05:00
committed by GitHub
+1 -1
View File
@@ -447,7 +447,7 @@ Rust has a special annotation called the `Copy` trait that we can place on
types like integers that are stored on the stack (we’ll talk more about traits types like integers that are stored on the stack (we’ll talk more about traits
in Chapter 10). If a type has the `Copy` trait, an older variable is still in Chapter 10). If a type has the `Copy` trait, an older variable is still
usable after assignment. Rust won’t let us annotate a type with the `Copy` usable after assignment. Rust won’t let us annotate a type with the `Copy`
trait if the type, or any of its parts, has implemented the `D``rop` trait. If trait if the type, or any of its parts, has implemented the `Drop` trait. If
the type needs something special to happen when the value goes out of scope and the type needs something special to happen when the value goes out of scope and
we add the `Copy` annotation to that type, we’ll get a compile time error. we add the `Copy` annotation to that type, we’ll get a compile time error.