Skip to content

Commit e84ea94

Browse files
committed
Translate a paragraph
1 parent 10b136a commit e84ea94

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/phantom-data.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,19 @@ struct Iter<'a, T: 'a> {
2222
}
2323
```
2424

25+
<!--
2526
However because `'a` is unused within the struct's body, it's *unbounded*.
2627
Because of the troubles this has historically caused, unbounded lifetimes and
2728
types are *forbidden* in struct definitions. Therefore we must somehow refer
2829
to these types in the body. Correctly doing this is necessary to have
2930
correct variance and drop checking.
31+
-->
32+
33+
しかし、 `'a` は構造体の本体内では使用されないため、 `'a`*無制限*のライフタイムとなります。
34+
これが過去に引き起こしてきた問題のために、無制限のライフタイムと無制限の型は、
35+
構造体の定義内では*禁じられています*。それ故に、なんとかして本体内にあるこれらの型を
36+
参照しなければなりません。正しくこれを行なうことは、正しい変性とドロップチェックを
37+
得るために必要です。
3038

3139
We do this using `PhantomData`, which is a special marker type. `PhantomData`
3240
consumes no space, but simulates a field of the given type for the purpose of

0 commit comments

Comments
 (0)