We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d1a551 commit 322a7d6Copy full SHA for 322a7d6
src/test/ui/specialization/issue-36804.rs
@@ -0,0 +1,31 @@
1
+// check-pass
2
+#![feature(specialization)]
3
+
4
+pub struct Cloned<I>(I);
5
6
+impl<'a, I, T: 'a> Iterator for Cloned<I>
7
+where
8
+ I: Iterator<Item = &'a T>,
9
+ T: Clone,
10
+{
11
+ type Item = T;
12
13
+ fn next(&mut self) -> Option<T> {
14
+ unimplemented!()
15
+ }
16
+}
17
18
19
20
21
+ T: Copy,
22
23
+ fn count(self) -> usize {
24
25
26
27
28
+fn main() {
29
+ let a = [1,2,3,4];
30
+ Cloned(a.iter()).count();
31
0 commit comments