]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/regions-implied-bounds-projection-gap-hr-1.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / test / compile-fail / regions-implied-bounds-projection-gap-hr-1.rs
index 47985f931dd34fe190cb588e123f6c69d1959a26..fd186d16559162b214001b548fc5b11301c10c82 100644 (file)
@@ -24,16 +24,13 @@ trait Trait2<'a, 'b> {
     type Foo;
 }
 
-fn wf<T>() { }
-
-// As a side-effect of the conservative process above, this argument
-// is not automatically considered well-formed, since for it to be WF,
-// we would need to know that `'y: 'x`, but we do not infer that.
-fn callee<'x, 'y, T>(
-    t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
-{
-    wf::<&'x &'y i32>();
+// As a side-effect of the conservative process above, the type of
+// this argument `t` is not automatically considered well-formed,
+// since for it to be WF, we would need to know that `'y: 'x`, but we
+// do not infer that.
+fn callee<'x, 'y, T>(t: &'x for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
     //~^ ERROR reference has a longer lifetime than the data it references
+{
 }
 
 fn main() { }