Skip to content

Commit 0602b87

Browse files
committed
Translate error messages
What is "block suffix" ?
1 parent f50eb94 commit 0602b87

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/dropck.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,22 +132,25 @@ fn main() {
132132

133133
```text
134134
<anon>:12:28: 12:32 error: `days` does not live long enough
135+
(エラー: `days` は十分長生きしません)
135136
<anon>:12 inspector = Inspector(&days);
136137
^~~~
137138
<anon>:9:11: 15:2 note: reference must be valid for the block at 9:10...
139+
(注釈: 参照は 9:10 にあるブロックに対して有効でなければなりません)
138140
<anon>:9 fn main() {
139141
<anon>:10 let (inspector, days);
140142
<anon>:11 days = Box::new(1);
141143
<anon>:12 inspector = Inspector(&days);
142-
<anon>:13 // Let's say `days` happens to get dropped first.
143-
<anon>:14 // Then when Inspector is dropped, it will try to read free'd memory!
144+
<anon>:13 // `days` が先にドロップするとしましょう。
145+
<anon>:14 // すると、 Inspector がドロップされる時、解放されたメモリを読もうとします!
144146
...
145147
<anon>:10:27: 15:2 note: ...but borrowed value is only valid for the block suffix following statement 0 at 10:26
148+
(注釈: ...しかし、借用された値は 10:26 にある、文 0 に続くブロックサフィックスに対してのみ有効です)
146149
<anon>:10 let (inspector, days);
147150
<anon>:11 days = Box::new(1);
148151
<anon>:12 inspector = Inspector(&days);
149-
<anon>:13 // Let's say `days` happens to get dropped first.
150-
<anon>:14 // Then when Inspector is dropped, it will try to read free'd memory!
152+
<anon>:13 // `days` が先にドロップするとしましょう。
153+
<anon>:14 // すると、 Inspector がドロップされる時、解放されたメモリを読もうとします!
151154
<anon>:15 }
152155
```
153156

0 commit comments

Comments
 (0)