fix line lengths
This commit is contained in:
parent
63de1ec070
commit
a9cefd0441
1 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
This error occurs when there is insufficient information for the rust compiler to
|
||||
prove that some time has a long enough lifetime.
|
||||
This error occurs when there is insufficient information for the rust compiler
|
||||
to prove that some time has a long enough lifetime.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
|
@ -22,10 +22,11 @@ where
|
|||
```
|
||||
|
||||
In this example we have a trait that borrows some inner data element of type `V`
|
||||
from an outer type `T`, through an intermediate type `U`. The compiler is unable to
|
||||
prove that the livetime of `U` is long enough to support the reference. To fix the
|
||||
issue we can explicitly add lifetime specifiers to the `NestedBorrowMut` trait, which
|
||||
link the lifetimes of the various data types and allow the code to compile.
|
||||
from an outer type `T`, through an intermediate type `U`. The compiler is unable
|
||||
to prove that the livetime of `U` is long enough to support the reference. To
|
||||
fix the issue we can explicitly add lifetime specifiers to the `NestedBorrowMut`
|
||||
trait, which link the lifetimes of the various data types and allow the code to
|
||||
compile.
|
||||
|
||||
Working implementation of the `NestedBorrowMut` trait:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue