]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/regions/regions-trait-object-subtyping.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-trait-object-subtyping.rs
index f108fc81cea4fed2a6aad99f024f557f1a8169a4..1d7a766de305a06f42842d3cf2b3130333b42703 100644 (file)
@@ -1,7 +1,3 @@
-// revisions: base nll
-// ignore-compare-mode-nll
-//[nll] compile-flags: -Z borrowck=mir
-
 trait Dummy { fn dummy(&self); }
 
 fn foo1<'a:'b,'b>(x: &'a mut (dyn Dummy+'a)) -> &'b mut (dyn Dummy+'b) {
@@ -17,17 +13,14 @@ fn foo2<'a:'b,'b>(x: &'b mut (dyn Dummy+'a)) -> &'b mut (dyn Dummy+'b) {
 fn foo3<'a,'b>(x: &'a mut dyn Dummy) -> &'b mut dyn Dummy {
     // Without knowing 'a:'b, we can't coerce
     x
-    //[base]~^ ERROR lifetime bound not satisfied
-    //[base]~| ERROR cannot infer an appropriate lifetime
-    //[nll]~^^^ ERROR lifetime may not live long enough
+    //~^ ERROR lifetime may not live long enough
 }
 
 struct Wrapper<T>(T);
 fn foo4<'a:'b,'b>(x: Wrapper<&'a mut dyn Dummy>) -> Wrapper<&'b mut dyn Dummy> {
     // We can't coerce because it is packed in `Wrapper`
     x
-    //[base]~^ ERROR mismatched types
-    //[nll]~^^ ERROR lifetime may not live long enough
+    //~^ ERROR lifetime may not live long enough
 }
 
 fn main() {}