]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/variance-invariant-self-trait-match.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / test / compile-fail / variance-invariant-self-trait-match.rs
index b46cd302ae5ea83ce1b6d2546295c358001aa148..fe61dee23bc2a03d04f63613132160f78766edc3 100644 (file)
@@ -15,13 +15,13 @@ trait Get {
 }
 
 fn get_min_from_max<'min, 'max, G>()
-    where 'max : 'min, &'max G : Get
+    where 'max : 'min, &'max G : Get, G : 'max
 {
     impls_get::<&'min G>(); //~ ERROR mismatched types
 }
 
 fn get_max_from_min<'min, 'max, G>()
-    where 'max : 'min, &'min G : Get
+    where 'max : 'min, &'min G : Get, G : 'min
 {
     impls_get::<&'max G>(); //~ ERROR mismatched types
 }