File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
branches/try/src/doc/tarpl Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 9123bb02ca3d71e16ce3e4a2ebb1fca49fcd93e2
4
+ refs/heads/try: b539906de1d12dc935a1c3db9e511518dddabb3d
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change 1
1
% Subtyping and Variance
2
2
3
- Although Rust doesn't have any notion of inheritance, it * does* include
4
- subtyping. In Rust, subtyping derives entirely from * lifetimes* . Since lifetimes
5
- are scopes, we can partially order them based on the * contains* (outlives)
6
- relationship. We can even express this as a generic bound.
3
+ Although Rust doesn't have any notion of structural inheritance, it * does*
4
+ include subtyping. In Rust, subtyping derives entirely from * lifetimes* . Since
5
+ lifetimes are scopes, we can partially order them based on the * contains*
6
+ (outlives) relationship. We can even express this as a generic bound.
7
7
8
8
Subtyping on lifetimes in terms of that relationship: if ` 'a: 'b ` ("a contains
9
9
b" or "a outlives b"), then ` 'a ` is a subtype of ` 'b ` . This is a large source of
You can’t perform that action at this time.
0 commit comments