]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/book/redirects/traits.md
New upstream version 1.25.0+dfsg1
[rustc.git] / src / doc / book / redirects / traits.md
index 469f5c574aaaf191c648e4b26a0fcc1be1067113..baffad4a4372cd8c951b9813cdc9cb50d75acfe8 100644 (file)
@@ -1,13 +1,22 @@
-% There is a new edition of the book
+% Traits
 
-This is an old link. You can [continue to the exact older page][1].
-If you're trying to learn Rust, checking out [the second edition][2] might be a better choice.
+<small>There is a new edition of the book and this is an old link.</small>
 
-* [This page in the first edition of the The Rust Programming Language][1]
+> Traits abstract over behavior that types can have in common.
 
-* [Related page in the second edition of The Rust Programming Language][2]
+```rust
+pub trait Summarizable {
+    fn summary(&self) -> String;
+}
+```
 
-* [Related page in the second edition of The Rust Programming Language (covering more advanced topics)][3]
+---
+
+Here are the relevant sections in the new and old books:
+
+* **[In the second edition: Ch 10.02 — Traits][2]**
+* [In the second edition: Ch 19.03 — Advanced Traits][3]
+* <small>[In the first edition: Ch 3.19 — Traits][1]</small>
 
 
 [1]: first-edition/traits.html