blob: d97f9821347efadfe6c640e42877894098ac987f [file] [log] [blame]
//@ check-pass
//@ revisions: current next
//@[next] compile-flags: -Znext-solver
//@ ignore-compare-mode-next-solver (explicit revisions)
// Make sure that refinement checking doesn't cause a cycle in `Instance::resolve`
// which calls `compare_impl_item`.
trait Foo {
fn test() -> impl IntoIterator<Item = ()> + Send;
}
struct A;
impl Foo for A {
fn test() -> impl IntoIterator<Item = ()> + Send {
B::test()
}
}
struct B;
impl Foo for B {
fn test() -> impl IntoIterator<Item = ()> + Send {
for () in A::test() {}
[]
}
}
fn main() {}