Skip to content

Commit 65d9cfe

Browse files
committed
Translate untranslated lines in lifetime.md
1 parent d672bef commit 65d9cfe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/scope/lifetime.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,31 @@ lifetimes relate to scopes, as well as how the two differ.
3636
// のスコープを完全に包含します。`borrow1`と`borrow2`の存続期間は一切重なりません。
3737
fn main() {
3838
let i = 3; // Lifetime for `i` starts. ────────────────┐
39+
// `i`のライフタイム開始 │
3940
// │
4041
{ // │
4142
let borrow1 = &i; // `borrow1` lifetime starts. ──┐│
43+
// `borrow1`のライフタイム開始 ││
4244
// ││
4345
println!("borrow1: {}", borrow1); // ││
4446
} // `borrow1` ends. ─────────────────────────────────┘│
47+
// `borrow1`終了 │
4548
// │
4649
// │
4750
{ // │
4851
let borrow2 = &i; // `borrow2` lifetime starts. ──┐│
52+
// `borrow2`のライフタイム開始 ││
4953
// ││
5054
println!("borrow2: {}", borrow2); // ││
5155
} // `borrow2` ends. ─────────────────────────────────┘│
56+
// `borrow2`終了 │
5257
// │
5358
} // Lifetime ends. ─────────────────────────────────────┘
59+
// ライフタイム終了
5460
```
5561

62+
<!--
5663
Note that no names or types are assigned to label lifetimes.
5764
This restricts how lifetimes will be able to be used as we will see.
65+
-->
66+
ここで、一切の名前や型がライフタイムにアサインされていないことに注意しましょう。これにより、ライフタイムの使われ方がこれから見ていくようなやり方に制限されます。

0 commit comments

Comments
 (0)