File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/rustc_error_codes/src/error_codes Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11This error occurs when there is an unsatisfied outlives bound involving an
2- elided region on a generic type parameter or associated type.
2+ elided region and a generic type parameter or associated type.
33
44Erroneous code example:
55
@@ -21,7 +21,7 @@ The compiler elides the lifetime of `x` and the return type to some arbitrary
2121lifetime ` 'anon ` in ` no_restriction() ` . The only information available to the
2222compiler is that ` 'anon ` is valid for the duration of the function. When
2323calling ` with_restriction() ` , the compiler requires the completely unrelated
24- type parameter ` T ` to outlive ` 'anon ` because of the ` T: 'a bound ` in
24+ type parameter ` T ` to outlive ` 'anon ` because of the ` T: 'a ` bound in
2525` with_restriction() ` . This causes an error because ` T ` is not required to
2626outlive ` 'anon ` in ` no_restriction() ` .
2727
You can’t perform that action at this time.
0 commit comments