]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-50825-1.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-50825-1.rs
CommitLineData
94b46f34
XL
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.
7cac9316 5
94b46f34
XL
6trait X {
7 type T;
b039eaaf 8}
85aaf69f 9
94b46f34
XL
10trait Y<U>: X {
11 fn foo(x: &Self::T);
b039eaaf 12}
223e47cc 13
94b46f34
XL
14impl X for () {
15 type T = ();
83c7162d
XL
16}
17
94b46f34
XL
18impl<T> Y<Vec<T>> for () where (): Y<T> {
19 fn foo(_x: &()) {}
c34b1796 20}
7cac9316 21
94b46f34 22fn main () {}