File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,15 @@ subtyping of its outputs. There are two kinds of variance in Rust:
94
94
型コンストラクタの* 変性* は、どのように型コンストラクタの入力の派生型が出力の派生型に
95
95
影響するかということです。 Rust では 2 種類の変性があります。
96
96
97
+ <!--
97
98
* F is *variant* over `T` if `T` being a subtype of `U` implies
98
99
`F<T>` is a subtype of `F<U>` (subtyping "passes through")
99
100
* 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 ` は* 非変性* です。(いかなる派生型の関係も継承されません)
100
106
101
107
(For those of you who are familiar with variance from other languages, what we
102
108
refer to as "just" variance is in fact * covariance* . Rust has * contravariance*
You can’t perform that action at this time.
0 commit comments