about summary refs log tree commit diff
path: root/tests/ui/where-clauses/issue-50825-1.rs
blob: 96b48068b0e160703dfbf928e78c2db3f965f0b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ check-pass
// regression test for issue #50825
// Make sure that the `impl` bound (): X<T = ()> is preferred over
// the (): X bound in the where clause.

trait X {
    type T;
}

trait Y<U>: X {
    fn foo(x: &Self::T);
}

impl X for () {
    type T = ();
}

impl<T> Y<Vec<T>> for () where (): Y<T> {
    fn foo(_x: &()) {}
}

fn main () {}