]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/wf/wf-static-method.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / wf / wf-static-method.rs
index 83557ce667bf6964bee0f7155d75700c107164af..7ff195230bfed9de1ae2ab4604528265a5a6915e 100644 (file)
@@ -4,10 +4,6 @@
 // static inherent methods isn't quite working - need to
 // fix that before removing the check.
 
-// revisions: base nll
-// ignore-compare-mode-nll
-//[nll] compile-flags: -Z borrowck=mir
-
 trait Foo<'a, 'b, T>: Sized {
     fn make_me() -> Self { loop {} }
     fn static_evil(u: &'b u32) -> &'a u32;
@@ -19,8 +15,7 @@ impl<'a, 'b> Foo<'a, 'b, Evil<'a, 'b>> for () {
     fn make_me() -> Self { }
     fn static_evil(u: &'b u32) -> &'a u32 {
         u
-        //[base]~^ ERROR E0312
-        //[nll]~^^ ERROR lifetime may not live long enough
+        //~^ ERROR lifetime may not live long enough
     }
 }
 
@@ -30,8 +25,7 @@ impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
     fn make_me() -> Self { IndirectEvil(None) }
     fn static_evil(u: &'b u32) -> &'a u32 {
         let me = Self::make_me();
-        //[base]~^ ERROR lifetime bound not satisfied
-        //[nll]~^^ ERROR lifetime may not live long enough
+        //~^ ERROR lifetime may not live long enough
         loop {} // (`me` could be used for the lifetime transmute).
     }
 }
@@ -39,8 +33,7 @@ impl<'a, 'b> Foo<'a, 'b, ()> for IndirectEvil<'a, 'b> {
 impl<'a, 'b> Evil<'a, 'b> {
     fn inherent_evil(u: &'b u32) -> &'a u32 {
         u
-        //[base]~^ ERROR E0312
-        //[nll]~^^ ERROR lifetime may not live long enough
+        //~^ ERROR lifetime may not live long enough
     }
 }
 
@@ -49,20 +42,17 @@ impl<'a, 'b> Evil<'a, 'b> {
 
 fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
     <()>::static_evil(b)
-    //[base]~^ ERROR cannot infer an appropriate lifetime
-    //[nll]~^^ ERROR lifetime may not live long enough
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
     <IndirectEvil>::static_evil(b)
-    //[base]~^ ERROR cannot infer an appropriate lifetime
-    //[nll]~^^ ERROR lifetime may not live long enough
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
     <Evil>::inherent_evil(b)
-    //[base]~^ ERROR cannot infer an appropriate lifetime
-    //[nll]~^^ ERROR lifetime may not live long enough
+    //~^ ERROR lifetime may not live long enough
 }