File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
compiler/rustc_error_codes/src/error_codes Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
- This error occurs when there is insufficient information for the rust compiler to
2
- prove that some time has a long enough lifetime.
1
+ This error occurs when there is insufficient information for the rust compiler
2
+ to prove that some time has a long enough lifetime.
3
3
4
4
Erroneous code example:
5
5
@@ -22,10 +22,11 @@ where
22
22
```
23
23
24
24
In this example we have a trait that borrows some inner data element of type ` V `
25
- from an outer type ` T ` , through an intermediate type ` U ` . The compiler is unable to
26
- prove that the livetime of ` U ` is long enough to support the reference. To fix the
27
- issue we can explicitly add lifetime specifiers to the ` NestedBorrowMut ` trait, which
28
- link the lifetimes of the various data types and allow the code to compile.
25
+ from an outer type ` T ` , through an intermediate type ` U ` . The compiler is unable
26
+ to prove that the livetime of ` U ` is long enough to support the reference. To
27
+ fix the issue we can explicitly add lifetime specifiers to the ` NestedBorrowMut `
28
+ trait, which link the lifetimes of the various data types and allow the code to
29
+ compile.
29
30
30
31
Working implementation of the ` NestedBorrowMut ` trait:
31
32
You can’t perform that action at this time.
0 commit comments