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