]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/specialization/issue-36804.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / specialization / issue-36804.rs
index 36cb939bc48fbdb069d08c28b966c5fa67e50746..89350602f3652bc58710e4c2d8387bb01c3c77ad 100644 (file)
@@ -1,5 +1,5 @@
 // check-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 pub struct Cloned<I>(I);
 
@@ -13,6 +13,10 @@ where
     fn next(&mut self) -> Option<T> {
         unimplemented!()
     }
+
+    default fn count(self) -> usize where Self: Sized {
+        self.fold(0, |cnt, _| cnt + 1)
+    }
 }
 
 impl<'a, I, T: 'a> Iterator for Cloned<I>