]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/impl-wf-cycle-1.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / ui / associated-types / impl-wf-cycle-1.rs
1 // Regression test for #79714
2
3 trait Baz {}
4 impl Baz for () {}
5 impl<T> Baz for (T,) {}
6
7 trait Fiz {}
8 impl Fiz for bool {}
9
10 trait Grault {
11     type A;
12     type B;
13 }
14
15 impl<T: Grault> Grault for (T,)
16 where
17     Self::A: Baz,
18     Self::B: Fiz,
19 {
20     type A = ();
21     //~^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _`
22     type B = bool;
23     //~^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _`
24 }
25 //~^^^^^^^^^^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _`
26
27 fn main() {
28     let x: <(_,) as Grault>::A = ();
29 }