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 8fca5b4 commit 8e45bc6Copy full SHA for 8e45bc6
src/subtyping.md
@@ -216,9 +216,14 @@ print it! Therefore `&mut` should be invariant.
216
ドロップされ、 `forever_str` は出力の際に解放されたメモリを指していたでしょう!
217
それ故に `&mut` は非変性である必要があるのです。
218
219
+<!--
220
This is the general theme of variance vs invariance: if variance would allow you
221
to store a short-lived value into a longer-lived slot, then you must be
222
invariant.
223
+-->
224
+
225
+変性か非変性かの一般的な主題はこちらです: もし変性によって、短く生きる値がより長く生きる
226
+スロットに保存されるようなことが起きてしまうならば、非変性でなければなりません。
227
228
However it *is* sound for `&'a mut T` to be variant over `'a`. The key difference
229
between `'a` and T is that `'a` is a property of the reference itself,
0 commit comments