We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fca1ec commit 157b328Copy full SHA for 157b328
src/subtyping.md
@@ -4,10 +4,17 @@
4
5
# 派生型と変性
6
7
+<!--
8
Although Rust doesn't have any notion of structural inheritance, it *does*
9
include subtyping. In Rust, subtyping derives entirely from lifetimes. Since
10
lifetimes are scopes, we can partially order them based on the *contains*
11
(outlives) relationship. We can even express this as a generic bound.
12
+-->
13
+
14
+Rust には構造の継承の概念はありませんが、派生型の概念は*あります*。
15
+Rust では、派生型は完全にライフタイムに由来します。ライフタイムはスコープですので、
16
+包含関係によって部分的にライフタイムを定めることが出来ます。
17
+ジェネリック境界として表現することも可能です。
18
19
Subtyping on lifetimes is in terms of that relationship: if `'a: 'b` ("a contains
20
b" or "a outlives b"), then `'a` is a subtype of `'b`. This is a large source of
0 commit comments