Skip to content

Commit fef50b9

Browse files
committed
Translate a paragraph
1 parent 2f6fe28 commit fef50b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/dropck.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ struct Inspector<T: fmt::Display>(T, &'static str);
249249
250250
impl<T: fmt::Display> Drop for Inspector<T> {
251251
fn drop(&mut self) {
252+
// Inspector(_, {}) はいつ調査を*しない*かを知っています。
252253
println!("Inspector(_, {}) knows when *not* to inspect.", self.1);
253254
}
254255
}
@@ -257,9 +258,9 @@ fn main() {
257258
let (inspector, days): (Inspector<&u8>, Box<u8>);
258259
days = Box::new(1);
259260
inspector = Inspector(&days, "gadget");
260-
// Let's say `days` happens to get dropped first.
261-
// Even when Inspector is dropped, its destructor will not access the
262-
// borrowed `days`.
261+
// `days` が先にドロップするとしましょう。
262+
// Inspector がドロップしたとしても、デストラクタは
263+
// 借用された `days` にアクセスしません
263264
}
264265
```
265266

0 commit comments

Comments
 (0)