]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/issue-13853.rs
Make RFC 1214 warnings into errors, and rip out the "warn or err"
[rust.git] / src / test / compile-fail / issue-13853.rs
index f5d158d64e19fa0a776a78d61568b76431290587..7643310298da3d84c4e001caefc8d7e52422da53 100644 (file)
@@ -13,11 +13,14 @@ trait Node {
 }
 
 trait Graph<N: Node> {
-    fn nodes<'a, I: Iterator<Item=&'a N>>(&'a self) -> I;
+    fn nodes<'a, I: Iterator<Item=&'a N>>(&'a self) -> I
+        where N: 'a;
 }
 
 impl<N: Node> Graph<N> for Vec<N> {
-    fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I {
+    fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
+        where N: 'a
+    {
         self.iter() //~ ERROR mismatched types
     }
 }