// Check that we eventually catch types of assoc const bounds // (containing late-bound vars) that are ill-formed. #![feature(associated_const_equality)] trait Trait { const K: T; } fn take( _: impl Trait< < fn(&'a str) -> &'a str as Project>::Out as Discard>::Out, K = { () } >, ) {} //~^^^^^^ ERROR implementation of `Project` is not general enough //~^^^^ ERROR higher-ranked subtype error //~| ERROR higher-ranked subtype error trait Project { type Out; } impl Project for fn(T) -> T { type Out = T; } trait Discard { type Out; } impl Discard for T { type Out = (); } fn main() {}