]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-50825-1.rs
Rollup merge of #96539 - tmandry:relnotes-1.61, r=Mark-Simulacrum
[rust.git] / src / test / ui / issues / issue-50825-1.rs
1 // run-pass
2 // regression test for issue #50825
3 // Make sure that the `impl` bound (): X<T = ()> is preferred over
4 // the (): X bound in the where clause.
5
6 trait X {
7     type T;
8 }
9
10 trait Y<U>: X {
11     fn foo(x: &Self::T);
12 }
13
14 impl X for () {
15     type T = ();
16 }
17
18 impl<T> Y<Vec<T>> for () where (): Y<T> {
19     fn foo(_x: &()) {}
20 }
21
22 fn main () {}