Skip to content

Commit 02da234

Browse files
committed
Use 'required' rather than 'have to' to avoid ambiguity
"only have to" has connotations of "the action is minimal" not "the action is required" to me
1 parent 6d02b88 commit 02da234

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ch10-03-lifetime-syntax.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ One detail we didn’t discuss in the [“References and
88
Borrowing”][references-and-borrowing]<!-- ignore --> section in Chapter 4 is
99
that every reference in Rust has a _lifetime_, which is the scope for which
1010
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 have to annotate types
12-
when multiple types are possible. In a similar way, we have to annotate lifetimes
13-
when the lifetimes of references could be related in a few different ways. Rust
14-
requires us to annotate the relationships using generic lifetime parameters to
15-
ensure the actual references used at runtime will definitely be valid.
11+
just like most of the time, types are inferred. We are only required to
12+
annotate types when multiple types are possible. In a similar way, we have to
13+
annotate lifetimes when the lifetimes of references could be related in a few
14+
different ways. Rust requires us to annotate the relationships using generic
15+
lifetime parameters to ensure the actual references used at runtime will
16+
definitely be valid.
1617

1718
Annotating lifetimes is not even a concept most other programming languages
1819
have, so this is going to feel unfamiliar. Although we won’t cover lifetimes in

0 commit comments

Comments
 (0)