]>
Commit | Line | Data |
---|---|---|
60c5eb7d | 1 | // check-pass |
0bf4aa26 | 2 | #![allow(dead_code)] |
c34b1796 AL |
3 | // pretty-expanded FIXME #23616 |
4 | ||
85aaf69f SL |
5 | trait T0 { |
6 | type O; | |
7 | fn dummy(&self) { } | |
8 | } | |
223e47cc | 9 | |
85aaf69f SL |
10 | struct S<A>(A); |
11 | impl<A> T0 for S<A> { type O = A; } | |
1a4d82fc | 12 | |
85aaf69f SL |
13 | trait T1: T0 { |
14 | // this looks okay but as we see below, `f` is unusable | |
15 | fn m0<F: Fn(<Self as T0>::O) -> bool>(self, f: F) -> bool; | |
16 | } | |
17 | ||
18 | // complains about mismatched types: <S<A> as T0>::O vs. A | |
19 | impl<A> T1 for S<A> | |
20 | { | |
21 | fn m0<F: Fn(<Self as T0>::O) -> bool>(self, f: F) -> bool { f(self.0) } | |
22 | } | |
223e47cc LB |
23 | |
24 | fn main() { } |