]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-17758.rs
Use revisions for NLL in issues
[rust.git] / src / test / ui / issues / issue-17758.rs
index d0dbd3455df782b34c871696b1c2a337fa937bb2..8090022b6d07454be965bafe4f71a2b09ec18fd0 100644 (file)
@@ -1,3 +1,7 @@
+// revisions: base nll
+// ignore-compare-mode-nll
+//[nll] compile-flags: -Z borrowck=mir
+
 // Test that regionck suggestions in a provided method of a trait
 // don't ICE
 
@@ -5,7 +9,8 @@ trait Foo<'a> {
     fn foo(&'a self);
     fn bar(&self) {
         self.foo();
-        //~^ ERROR cannot infer
+        //[base]~^ ERROR cannot infer
+        //[nll]~^^ ERROR lifetime may not live long enough
     }
 }