Skip to content

Commit 56d3742

Browse files
authored
Rollup merge of #63394 - jackh726:issue-36804, r=jonas-schievink
Add test for issue 36804 I slightly reduced the repro that ICEs on nightly-2017-01-20. Closes #36804
2 parents 4cd0e7d + 322a7d6 commit 56d3742

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
+31
Original file line numberDiff line numberDiff line change
@@ -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+
impl<'a, I, T: 'a> Iterator for Cloned<I>
19+
where
20+
I: Iterator<Item = &'a T>,
21+
T: Copy,
22+
{
23+
fn count(self) -> usize {
24+
unimplemented!()
25+
}
26+
}
27+
28+
fn main() {
29+
let a = [1,2,3,4];
30+
Cloned(a.iter()).count();
31+
}

0 commit comments

Comments
 (0)