]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/regions/regions-early-bound-error-method.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-early-bound-error-method.rs
index 32428143ef9d90f3506fbf6bdaa7694b9948d3b4..44ee19fa898b8f6735f47bc809393ea8e080acdf 100644 (file)
@@ -1,6 +1,10 @@
 // Tests that you can use a fn lifetime parameter as part of
 // the value for a type parameter in a bound.
 
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 trait GetRef<'a> {
     fn get(&self) -> &'a isize;
 }
@@ -18,7 +22,8 @@ impl<'a> GetRef<'a> for Box<'a> {
 impl<'a> Box<'a> {
     fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize {
         g2.get()
-        //~^ ERROR E0312
+        //[base]~^ ERROR E0312
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }