]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/impl-trait/type_parameters_captured.rs
Rollup merge of #95504 - jyn514:library-alias, r=Mark-Simulacrum
[rust.git] / src / test / ui / impl-trait / type_parameters_captured.rs
index 81ee7d3f8a561dc5436d1d4b32990348b3fc58fa..bb9cab742a58f81bac9e25365b9a17b1e9058749 100644 (file)
@@ -5,8 +5,9 @@ impl<T> Any for T {}
 
 // Check that type parameters are captured and not considered 'static
 fn foo<T>(x: T) -> impl Any + 'static {
-    x
     //~^ ERROR the parameter type `T` may not live long enough
+    //~| ERROR the parameter type `T` may not live long enough
+    x
 }
 
 fn main() {}