Skip to content

Commit 48deaa9

Browse files
committed
Translate a paragraph
"... and that the only use of `T` will be moves or drops, " Really? Does this conflict with the description of #[may_dangle]?
1 parent 1de7dc2 commit 48deaa9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/dropck.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,19 @@ compiler is not checking the implicit assertion that no potentially expired data
367367
なぜならコンパイラは、いかなる既に破棄されているかもしれないデータ (例えば上記の `self.0`) にアクセスしないという
368368
暗黙の主張について検査しないからです。
369369

370+
<!--
370371
The attribute can be applied to any number of lifetime and type parameters. In
371372
the following example, we assert that we access no data behind a reference of
372373
lifetime `'b` and that the only uses of `T` will be moves or drops, but omit
373374
the attribute from `'a` and `U`, because we do access data with that lifetime
374375
and that type:
376+
-->
377+
378+
このアトリビュートはライフタイムや型パラメータにいくつでも適用することが出来ます。
379+
以下の例では、 `'b` のライフタイムを持つ参照の先にあるデータにアクセスしないこと、
380+
そして、 `T` がムーブやドロップにのみ使用されることを主張します。
381+
しかし、 `'a``U` にはこのアトリビュートは省略します。なぜなら、これらのライフタイムや
382+
型を持つデータに実際にアクセスするからです。
375383

376384
```rust,ignore
377385
use std::fmt::Display;

0 commit comments

Comments
 (0)