rust/tests/ui/traits/new-solver/exponential-trait-goals.rs
2023-04-26 21:54:30 +00:00

21 lines
318 B
Rust

// compile-flags: -Ztrait-solver=next
trait Trait {}
struct W<T>(T);
impl<T, U> Trait for W<(W<T>, W<U>)>
where
W<T>: Trait,
W<U>: Trait,
{
}
fn impls<T: Trait>() {}
fn main() {
impls::<W<_>>();
//~^ ERROR type annotations needed
//~| ERROR overflow evaluating the requirement `W<_>: Trait`
}