]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / projection-type-lifetime-mismatch.rs
index 9b04fe233208ecae8458949dc9a5f7ee6c4686d5..a40c0c2c4c74e8b4c1d756cf087e1893ae6606a4 100644 (file)
@@ -15,17 +15,17 @@ impl X for () {
 
 fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
     x.m()
-    //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
     x.m()
-    //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn h(x: &()) -> &'static () {
     x.m()
-    //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn main() {