diff options
| author | Matthew Kelly <matthew.kelly2@gmail.com> | 2022-09-27 19:23:59 -0400 |
|---|---|---|
| committer | Matthew Kelly <matthew.kelly2@gmail.com> | 2022-09-27 19:23:59 -0400 |
| commit | c0d32fd2cc4eafe4f621490e7c44b7af04d1f2be (patch) | |
| tree | 0c9ef97395146f93195e7681434c4cd56e8a3d9c /compiler/rustc_error_codes | |
| parent | 0d9c01480b9142e9c0aea24500a9461c2bee5a68 (diff) | |
| download | rust-c0d32fd2cc4eafe4f621490e7c44b7af04d1f2be.tar.gz rust-c0d32fd2cc4eafe4f621490e7c44b7af04d1f2be.zip | |
review updates
Diffstat (limited to 'compiler/rustc_error_codes')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0311.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0311.md b/compiler/rustc_error_codes/src/error_codes/E0311.md index 768b849817d..08159d3f469 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0311.md +++ b/compiler/rustc_error_codes/src/error_codes/E0311.md @@ -1,5 +1,5 @@ This error occurs when there is an unsatisfied outlives bound involving an -elided region on a generic type parameter or associated type. +elided region and a generic type parameter or associated type. Erroneous code example: @@ -21,7 +21,7 @@ The compiler elides the lifetime of `x` and the return type to some arbitrary lifetime `'anon` in `no_restriction()`. The only information available to the compiler is that `'anon` is valid for the duration of the function. When calling `with_restriction()`, the compiler requires the completely unrelated -type parameter `T` to outlive `'anon` because of the `T: 'a bound` in +type parameter `T` to outlive `'anon` because of the `T: 'a` bound in `with_restriction()`. This causes an error because `T` is not required to outlive `'anon` in `no_restriction()`. |
