File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 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
88Borrowing”] [ references-and-borrowing ] <!-- ignore --> section in Chapter 4 is
99that every reference in Rust has a * lifetime* , which is the scope for which
1010that 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
1212when multiple types are possible. In a similar way, we must annotate lifetimes
1313when the lifetimes of references could be related in a few different ways. Rust
1414requires us to annotate the relationships using generic lifetime parameters to
1515ensure the actual references used at runtime will definitely be valid.
1616
17- Annotating lifetimes is not even a concept most other programming languages
17+ Annotating lifetimes is not a concept most other programming languages
1818have, so this is going to feel unfamiliar. Although we won’t cover lifetimes in
1919their entirety in this chapter, we’ll discuss common ways you might encounter
2020lifetime syntax so you can get comfortable with the concept.
You can’t perform that action at this time.
0 commit comments