]> git.lizzy.rs Git - rust.git/commitdiff
remove implied link bound per review
authorMatthew Kelly <matthew.kelly2@gmail.com>
Tue, 27 Sep 2022 00:50:33 +0000 (20:50 -0400)
committerMatthew Kelly <matthew.kelly2@gmail.com>
Tue, 27 Sep 2022 00:50:33 +0000 (20:50 -0400)
also update .stderr outputs

compiler/rustc_error_codes/src/error_codes/E0311.md
src/test/ui/error-codes/E0311.stderr
src/test/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr

index 638c3e0a4373f62c778d18a218bfb7dd336b05da..768b849817db575b9d0a12ef63de833d251be59f 100644 (file)
@@ -26,9 +26,7 @@ type parameter `T` to outlive `'anon` because of the `T: 'a bound` in
 outlive `'anon` in `no_restriction()`.
 
 If `no_restriction()` were to use `&T` instead of `&()` as an argument, the
-compiler would have added an implied bound [implied
-bound](https://rust-lang.github.io/rfcs/2089-implied-bounds.html), causing this
-to compile.
+compiler would have added an implied bound, causing this to compile.
 
 This error can be resolved by explicitly naming the elided lifetime for `x` and
 then explicily requiring that the generic parameter `T` outlives that lifetime:
index bc0182555af864b90268810542e1a1b264117216..9873b5ae6ff1330a100c37313270ec46b0b41b12 100644 (file)
@@ -16,8 +16,8 @@ LL |     with_restriction::<T>(x)
    |     ^^^^^^^^^^^^^^^^^^^^^
 help: consider adding an explicit lifetime bound...
    |
-LL | fn no_restriction<T: 'a>(x: &()) -> &() {
-   |                    ++++
+LL | fn no_restriction<'a, T: 'a>(x: &()) -> &() {
+   |                   +++  ++++
 
 error: aborting due to previous error
 
index a8b0996d8b0c71ad404e19ca4b5ff8dc64cd6e69..31fd8a4d633e9135d8d6c2cce59bc49ff755593c 100644 (file)
@@ -21,3 +21,4 @@ LL | fn no_restriction<'a, T: 'a>(x: &()) -> &() {
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0311`.