blob: 864c31893504f8483ee892e3258b2b72db4c0f4b [file] [log] [blame]
//@ check-pass
//@ revisions: current next
//@[next] compile-flags: -Znext-solver
trait Trait
where
Self::Assoc: Clone,
{
type Assoc;
}
fn foo<T: Trait>(x: &T::Assoc) -> T::Assoc {
x.clone()
}
trait Trait2
where
Self::Assoc: Iterator,
<Self::Assoc as Iterator>::Item: Clone,
{
type Assoc;
}
fn foo2<T: Trait2>(x: &<T::Assoc as Iterator>::Item) -> <T::Assoc as Iterator>::Item {
x.clone()
}
fn main() {}