Skip to content

Commit 0d0cdb7

Browse files
authored
Wrap & improve
1 parent 2a0bd6d commit 0d0cdb7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/doc/book/lifetimes.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ To fix this, we have to make sure that step four never happens after step
5656
three. The ownership system in Rust does this through a concept called
5757
lifetimes, which describe the scope that a reference is valid for.
5858

59-
**Note** It's important to understand that lifetime annotations are _descriptive_, not _prescriptive_. This means that how long a reference is valid is determined by the code, not by the annotations. The annotations, however, point out this fact to the compiler in case it can't figure it out by itself.
60-
61-
When we have a function that takes an argument by reference, we can be
62-
implicit or explicit about the lifetime of the reference:
59+
**Note** It's important to understand that lifetime annotations are
60+
_descriptive_, not _prescriptive_. This means that how long a reference is valid
61+
is determined by the code, not by the annotations. The annotations, however,
62+
give information about lifetimes to the compiler that uses them to check the
63+
validity of references. The compiler can do so without annotations in simple
64+
cases, but needs the programmers support in complex scenarios.
6365

6466
```rust
6567
// implicit

0 commit comments

Comments
 (0)