]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs
Rollup merge of #92917 - jackh726:issue-91762-2, r=nikomatsakis
[rust.git] / src / test / ui / type-alias-impl-trait / generic_type_does_not_live_long_enough.rs
index 78d25e30e0382eba41de11a042664471784ca8a2..cb90776472b5dc543fd395548d0cbe41082ca61f 100644 (file)
@@ -3,13 +3,14 @@
 fn main() {
     let y = 42;
     let x = wrong_generic(&y);
-    let z: i32 = x; //~ ERROR mismatched types
+    let z: i32 = x;
+    //~^ ERROR non-defining opaque type use
 }
 
 type WrongGeneric<T> = impl 'static;
 //~^ ERROR: at least one trait must be specified
 
 fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
-    //~^ ERROR the parameter type `T` may not live long enough
     t
+    //~^ ERROR the parameter type `T` may not live long enough
 }