// compile-flags: -Znext-solver // Check that we consider the reached depth of global cache // entries when detecting overflow. We would otherwise be unstable // wrt to incremental compilation. #![recursion_limit = "9"] trait Trait {} struct Inc(T); impl Trait for Inc {} impl Trait for () {} fn impls_trait() {} type Four = Inc>>>; fn main() { impls_trait::>>(); impls_trait::>>>>(); //~^ ERROR overflow evaluating the requirement }