From b539906de1d12dc935a1c3db9e511518dddabb3d Mon Sep 17 00:00:00 2001 From: Alexis Beingessner Date: Tue, 28 Jul 2015 15:41:58 -0700 Subject: [PATCH] clarify subtyping --- src/doc/tarpl/subtyping.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/tarpl/subtyping.md b/src/doc/tarpl/subtyping.md index 975d1c59c76d..767a0aca542f 100644 --- a/src/doc/tarpl/subtyping.md +++ b/src/doc/tarpl/subtyping.md @@ -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