File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ One detail we didn’t discuss in the [“References and
8
8
Borrowing”] [ references-and-borrowing ] <!-- ignore --> section in Chapter 4 is
9
9
that every reference in Rust has a * lifetime* , which is the scope for which
10
10
that reference is valid. Most of the time, lifetimes are implicit and inferred,
11
- just like most of the time, types are inferred. We only must annotate types
11
+ just like most of the time, types are inferred. We must only annotate types
12
12
when multiple types are possible. In a similar way, we must annotate lifetimes
13
13
when the lifetimes of references could be related in a few different ways. Rust
14
14
requires us to annotate the relationships using generic lifetime parameters to
15
15
ensure the actual references used at runtime will definitely be valid.
16
16
17
- Annotating lifetimes is not even a concept most other programming languages
17
+ Annotating lifetimes is not a concept most other programming languages
18
18
have, so this is going to feel unfamiliar. Although we won’t cover lifetimes in
19
19
their entirety in this chapter, we’ll discuss common ways you might encounter
20
20
lifetime syntax so you can get comfortable with the concept.
You can’t perform that action at this time.
0 commit comments