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 b9ef4ad commit 6dd5d14Copy full SHA for 6dd5d14
src/dropck.md
@@ -452,8 +452,10 @@ struct Inspector<T: fmt::Display>(T, &'static str);
452
453
impl<T: fmt::Display> Drop for Inspector<T> {
454
fn drop(&mut self) {
455
- // There is a hidden call to `<T as Display>::fmt` below, which
456
- // could access a borrow e.g. if `T` is `&'a _`
+ // 以下のコードには隠れている、 `<T as Display>::fmt` の呼び出しがあります。
+ // もし `T` が `&'a _` である場合、この呼び出しで借用されたデータにアクセス出来てしまうでしょう。
457
+
458
+ // Inspector({}, {}) はうっかり破棄されたデータにアクセスしてしまいます。
459
println!("Inspector({}, {}) unwittingly inspects expired data.",
460
self.0, self.1);
461
}
0 commit comments