//@ check-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver // Fix for . trait Tr { type Gat; } struct W(T); fn foo() where for<'a> &'a T: Tr> = i32> { let x: <&T as Tr>::Gat> = 1i32; // Previously, `match_projection_projections` only checked that // `shallow_resolve(W) = W`. This won't prevent *all* inference guidance // from projection predicates in the environment, just ones that guide the // outermost type of each GAT constructor. This is definitely wrong, but there is // code that relies on it in the wild :/ } fn main() {}