From fae5fa82d728b5965ecbba84060689430345e509 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 15 Mar 2017 19:42:46 -0400 Subject: [PATCH] Add a reference to derivable traits appendix Alternative to #427. --- second-edition/src/ch04-01-what-is-ownership.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/second-edition/src/ch04-01-what-is-ownership.md b/second-edition/src/ch04-01-what-is-ownership.md index 0d53487e4..1c4f2f5a5 100644 --- a/second-edition/src/ch04-01-what-is-ownership.md +++ b/second-edition/src/ch04-01-what-is-ownership.md @@ -416,7 +416,9 @@ 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` 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 -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. To +learn about how to add the `Copy` annotation to your type, see Appendix C on +Derivable Traits. So what types are `Copy`? You can check the documentation for the given type to be sure, but as a general rule, any group of simple scalar values can be