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:
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
102108refer to as "just" variance is in fact * covariance* . Rust has * contravariance*
You can’t perform that action at this time.
0 commit comments