Skip to content

Commit f50eb94

Browse files
committed
Translate comments and output
1 parent c49a92e commit f50eb94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dropck.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ struct Inspector<'a>(&'a u8);
116116
117117
impl<'a> Drop for Inspector<'a> {
118118
fn drop(&mut self) {
119+
// 退職からたった{}日でした!
119120
println!("I was only {} days from retirement!", self.0);
120121
}
121122
}
@@ -124,8 +125,8 @@ fn main() {
124125
let (inspector, days);
125126
days = Box::new(1);
126127
inspector = Inspector(&days);
127-
// Let's say `days` happens to get dropped first.
128-
// Then when Inspector is dropped, it will try to read free'd memory!
128+
// `days` が先にドロップするとしましょう。
129+
// すると、 Inspector がドロップされる時、解放されたメモリを読もうとします!
129130
}
130131
```
131132

0 commit comments

Comments
 (0)