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