Skip to content

Commit d3b2572

Browse files
committed
Translate a paragraph
1 parent 54b2518 commit d3b2572

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/subtyping.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,15 @@ subtyping of its outputs. There are two kinds of variance in Rust:
9494
型コンストラクタの*変性*は、どのように型コンストラクタの入力の派生型が出力の派生型に
9595
影響するかということです。 Rust では 2 種類の変性があります。
9696

97+
<!--
9798
* F is *variant* over `T` if `T` being a subtype of `U` implies
9899
`F<T>` is a subtype of `F<U>` (subtyping "passes through")
99100
* F is *invariant* over `T` otherwise (no subtyping relation can be derived)
101+
-->
102+
103+
* もし `T``U` の派生型である時、 `F<T>``F<U>` の派生型であるならば、 `F`
104+
*変性*です。(派生型の「パススルー」)
105+
* それ以外の場合、 `T`*非変性*です。(いかなる派生型の関係も継承されません)
100106

101107
(For those of you who are familiar with variance from other languages, what we
102108
refer to as "just" variance is in fact *covariance*. Rust has *contravariance*

0 commit comments

Comments
 (0)