Skip to content

Commit 8e45bc6

Browse files
committed
Translate a paragraph
1 parent 8fca5b4 commit 8e45bc6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/subtyping.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,14 @@ print it! Therefore `&mut` should be invariant.
216216
ドロップされ、 `forever_str` は出力の際に解放されたメモリを指していたでしょう!
217217
それ故に `&mut` は非変性である必要があるのです。
218218

219+
<!--
219220
This is the general theme of variance vs invariance: if variance would allow you
220221
to store a short-lived value into a longer-lived slot, then you must be
221222
invariant.
223+
-->
224+
225+
変性か非変性かの一般的な主題はこちらです: もし変性によって、短く生きる値がより長く生きる
226+
スロットに保存されるようなことが起きてしまうならば、非変性でなければなりません。
222227

223228
However it *is* sound for `&'a mut T` to be variant over `'a`. The key difference
224229
between `'a` and T is that `'a` is a property of the reference itself,

0 commit comments

Comments
 (0)