blob: 5c2781a9c63a6eb4267ed4bb53f5d0dfb874f1ac [file] [log] [blame]
// run-pass
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Iterator {
fn next(&self);
}
trait WithAssoc {
type Item;
}
impl<'a> WithAssoc for &'a () {
type Item = &'a u32;
}
struct Cloned<I>(I);
impl<'a, I, T: 'a> Iterator for Cloned<I>
where I: WithAssoc<Item=&'a T>, T: Clone
{
fn next(&self) {}
}
impl<'a, I, T: 'a> Iterator for Cloned<I>
where I: WithAssoc<Item=&'a T>, T: Copy
{
}
fn main() {
Cloned(&()).next();
}