]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/specialization-translate-projections-with-lifetimes.rs
Auto merge of #73456 - tmiasko:musl-libdir, r=Mark-Simulacrum
[rust.git] / src / test / ui / specialization / specialization-translate-projections-with-lifetimes.rs
1 // run-pass
2
3 #![feature(specialization)] //~ WARN the feature `specialization` is incomplete
4
5 trait Iterator {
6     fn next(&self);
7 }
8
9 trait WithAssoc {
10     type Item;
11 }
12
13 impl<'a> WithAssoc for &'a () {
14     type Item = &'a u32;
15 }
16
17 struct Cloned<I>(I);
18
19 impl<'a, I, T: 'a> Iterator for Cloned<I>
20     where I: WithAssoc<Item=&'a T>, T: Clone
21 {
22     fn next(&self) {}
23 }
24
25 impl<'a, I, T: 'a> Iterator for Cloned<I>
26     where I: WithAssoc<Item=&'a T>, T: Copy
27 {
28
29 }
30
31 fn main() {
32     Cloned(&()).next();
33 }