]>
Commit | Line | Data |
---|---|---|
a2a8927a XL |
1 | // check-pass |
2 | // Regresion test for <https://github.com/rust-lang/rust/issues/79459>. | |
3 | pub trait Query {} | |
4 | ||
5 | pub trait AsQuery { | |
6 | type Query; | |
7 | } | |
8 | ||
9 | impl<T: Query> AsQuery for T { | |
10 | type Query = T; | |
11 | } | |
12 | ||
13 | pub trait SelectDsl<Selection> { | |
14 | type Output; | |
15 | } | |
16 | ||
17 | impl<T, Selection> SelectDsl<Selection> for T | |
18 | where | |
19 | T: AsQuery, | |
20 | T::Query: SelectDsl<Selection>, | |
21 | { | |
22 | type Output = <T::Query as SelectDsl<Selection>>::Output; | |
23 | } | |
24 | ||
25 | pub type Select<Source, Selection> = <Source as SelectDsl<Selection>>::Output; |