rust/tests/ui/traits/next-solver/overflow/exponential-trait-goals.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
274 B
Rust
Raw Normal View History

2023-12-14 13:11:28 +01:00
//@ compile-flags: -Znext-solver
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 overflow evaluating the requirement `W<_>: Trait`
}