]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.base.stderr
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / generic_type_does_not_live_long_enough.base.stderr
index a3b410c2cfb8c4946c53b40be46e6e828b4bf979..593fb8af32f30400a1ce4f9bf9ed41a335b876a2 100644 (file)
@@ -19,10 +19,13 @@ LL | type WrongGeneric<T> = impl 'static;
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/generic_type_does_not_live_long_enough.rs:18:5
    |
-LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
-   |                  - help: consider adding an explicit lifetime bound...: `T: 'static`
 LL |     t
    |     ^ ...so that the type `T` will meet its required lifetime bounds
+   |
+help: consider adding an explicit lifetime bound...
+   |
+LL | fn wrong_generic<T: 'static>(t: T) -> WrongGeneric<T> {
+   |                   +++++++++
 
 error: aborting due to 3 previous errors