File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,19 @@ struct Iter<'a, T: 'a> {
2222}
2323```
2424
25+ <!--
2526However because `'a` is unused within the struct's body, it's *unbounded*.
2627Because of the troubles this has historically caused, unbounded lifetimes and
2728types are *forbidden* in struct definitions. Therefore we must somehow refer
2829to these types in the body. Correctly doing this is necessary to have
2930correct variance and drop checking.
31+ -->
32+
33+ しかし、 ` 'a ` は構造体の本体内では使用されないため、 ` 'a ` は* 無制限* のライフタイムとなります。
34+ これが過去に引き起こしてきた問題のために、無制限のライフタイムと無制限の型は、
35+ 構造体の定義内では* 禁じられています* 。それ故に、なんとかして本体内にあるこれらの型を
36+ 参照しなければなりません。正しくこれを行なうことは、正しい変性とドロップチェックを
37+ 得るために必要です。
3038
3139We do this using ` PhantomData ` , which is a special marker type. ` PhantomData `
3240consumes no space, but simulates a field of the given type for the purpose of
You can’t perform that action at this time.
0 commit comments