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 ee4a8b4 commit 17c369cCopy full SHA for 17c369c
src/dropck.md
@@ -471,11 +471,18 @@ directly within it.
471
そして勿論、これら全てのアクセスは、何か他のメソッド内に直接書かれるよりも、
472
デストラクタによって呼び出されたメソッドの内部に更に隠されうる事があります。
473
474
+<!--
475
In all of the above cases where the `&'a u8` is accessed in the
476
destructor, adding the `#[may_dangle]`
477
attribute makes the type vulnerable to misuse that the borrower
478
checker will not catch, inviting havoc. It is better to avoid adding
479
the attribute.
480
+-->
481
+
482
+デストラクタ内の `&'a u8` にアクセスされる上記の全てのケースにおいて、
483
+`#[may_dangle]` アトリビュートを付け足すことで、借用チェッカが捕捉しないような
484
+誤用に対して型が脆弱になり、これによって惨事を引き起こします。
485
+このアトリビュートを付け足すのは避ける方がよいでしょう。
486
487
# Is that all about drop checker?
488
0 commit comments