//@ 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 + Send; } struct A; impl Foo for A { fn test() -> impl IntoIterator + Send { B::test() } } struct B; impl Foo for B { fn test() -> impl IntoIterator + Send { for () in A::test() {} [] } } fn main() {}