]> git.lizzy.rs Git - rust.git/commitdiff
clarify subtyping
authorAlexis Beingessner <a.beingessner@gmail.com>
Tue, 28 Jul 2015 22:41:58 +0000 (15:41 -0700)
committerAlexis Beingessner <a.beingessner@gmail.com>
Tue, 28 Jul 2015 22:41:58 +0000 (15:41 -0700)
src/doc/tarpl/subtyping.md

index 975d1c59c76db43e4b6e163df59093047f5fa7ae..767a0aca542f96b26ec7127f428aa6184439bffd 100644 (file)
@@ -1,9 +1,9 @@
 % Subtyping and Variance
 
-Although Rust doesn't have any notion of inheritance, it *does* include
-subtyping. In Rust, subtyping derives entirely from *lifetimes*. Since lifetimes
-are scopes, we can partially order them based on the *contains* (outlives)
-relationship. We can even express this as a generic bound.
+Although Rust doesn't have any notion of structural inheritance, it *does*
+include subtyping. In Rust, subtyping derives entirely from *lifetimes*. Since
+lifetimes are scopes, we can partially order them based on the *contains*
+(outlives) relationship. We can even express this as a generic bound.
 
 Subtyping on lifetimes in terms of that relationship: if `'a: 'b` ("a contains
 b" or "a outlives b"), then `'a` is a subtype of `'b`. This is a large source of