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.
33
44Erroneous code example:
55
@@ -22,10 +22,11 @@ where
2222```
2323
2424In 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.
2930
3031Working implementation of the ` NestedBorrowMut ` trait:
3132
You can’t perform that action at this time.
0 commit comments