Skip to content

Commit c380b9f

Browse files
committed
Translate a paragraph
harbor: Not sure how to translate. Sound drop checker: "Sound" means "good" or "not a problem". "サウンド" is not a proper word for this translation.
1 parent efeaf82 commit c380b9f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/dropck.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,23 @@ live as long as it does actually were destroyed first.
163163
Drop トレイトを実装することで、 Inspector が最後に任意のコードを実行するようにできます。
164164
これは、 Inspector と同じだけ生きる型が、実際には先に破棄されると潜在的に認識できます。
165165

166+
<!--
166167
Interestingly, only generic types need to worry about this. If they aren't
167168
generic, then the only lifetimes they can harbor are `'static`, which will truly
168169
live *forever*. This is why this problem is referred to as *sound generic drop*.
169170
Sound generic drop is enforced by the *drop checker*. As of this writing, some
170171
of the finer details of how the drop checker validates types is totally up in
171172
the air. However The Big Rule is the subtlety that we have focused on this whole
172173
section:
174+
-->
175+
176+
興味深いことに、ジェネリックな型だけがこれを気に掛ける必要があります。
177+
もし型がジェネリックでなければ、型が隠蔽できる唯一のライフタイムは `'static` です。
178+
このライフタイムは本当に*永遠に*生き続けます。これが、この問題が*サウンドジェネリックドロップ*として
179+
呼ばれている理由です。サウンドジェネリックドロップは*ドロップチェッカ*によって実行されます。
180+
Rust nomicon の英語版のこの章が書かれた時点で、ドロップチェッカがどのように型の有効性を
181+
確かめるかについてのより細かい部分については全く決まっていません。しかし、大まかな規則は、
182+
この章全体で注目してきた僅かなものです。
173183

174184
**For a generic type to soundly implement drop, its generics arguments must
175185
strictly outlive it.**

0 commit comments

Comments
 (0)