diff options
| author | Alexis Beingessner <a.beingessner@gmail.com> | 2015-07-28 15:41:58 -0700 |
|---|---|---|
| committer | Alexis Beingessner <a.beingessner@gmail.com> | 2015-07-28 15:41:58 -0700 |
| commit | b539906de1d12dc935a1c3db9e511518dddabb3d (patch) | |
| tree | 367842d26888a35345301fe16939de1d78744e52 | |
| parent | 9123bb02ca3d71e16ce3e4a2ebb1fca49fcd93e2 (diff) | |
| download | rust-b539906de1d12dc935a1c3db9e511518dddabb3d.tar.gz rust-b539906de1d12dc935a1c3db9e511518dddabb3d.zip | |
clarify subtyping
| -rw-r--r-- | src/doc/tarpl/subtyping.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/tarpl/subtyping.md b/src/doc/tarpl/subtyping.md index 975d1c59c76..767a0aca542 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 |
