//@ check-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver // Regression test for . // See comment below. trait A { fn hello(&self) {} } trait B { fn hello(&self) {} } impl A for T {} impl B for T {} fn test(q: F::Item) where F: Iterator, // We want to prefer `A` for `R.hello()` F::Item: A, { q.hello(); } fn main() {}