File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ struct Inspector<T: fmt::Display>(T, &'static str);
249
249
250
250
impl<T: fmt::Display> Drop for Inspector<T> {
251
251
fn drop(&mut self) {
252
+ // Inspector(_, {}) はいつ調査を*しない*かを知っています。
252
253
println!("Inspector(_, {}) knows when *not* to inspect.", self.1);
253
254
}
254
255
}
@@ -257,9 +258,9 @@ fn main() {
257
258
let (inspector, days): (Inspector<&u8>, Box<u8>);
258
259
days = Box::new(1);
259
260
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` にアクセスしません
263
264
}
264
265
```
265
266
You can’t perform that action at this time.
0 commit comments