]> git.lizzy.rs Git - rust.git/blob - tests/incremental/issue-100521-change-struct-name-assocty.rs
Rollup merge of #107323 - JakobDegen:const-goto, r=tmiasko
[rust.git] / tests / incremental / issue-100521-change-struct-name-assocty.rs
1 // revisions: rpass1 rpass2
2
3 pub fn foo() {
4     bar();
5     baz::<()>();
6 }
7
8 fn bar()
9 where
10     <() as Table>::AllColumns:,
11 {
12 }
13
14 fn baz<W>()
15 where
16     W: AsQuery,
17     <W as AsQuery>::Query:,
18 {
19 }
20
21 trait AsQuery {
22     type Query;
23 }
24
25 trait UnimplementedTrait {}
26
27 impl<T> AsQuery for T
28 where
29     T: UnimplementedTrait,
30 {
31     type Query = ();
32 }
33
34 struct Wrapper<Expr>(Expr);
35
36 impl<Ret> AsQuery for Wrapper<Ret> {
37     type Query = ();
38 }
39
40 impl AsQuery for ()
41 where
42     Wrapper<<() as Table>::AllColumns>: AsQuery,
43 {
44     type Query = ();
45 }
46
47 trait Table {
48     type AllColumns;
49 }
50
51 #[cfg(rpass1)]
52 impl Table for () {
53     type AllColumns = Checksum1;
54 }
55 #[cfg(rpass1)]
56 struct Checksum1;
57
58 #[cfg(rpass2)]
59 impl Table for () {
60     type AllColumns = Checksum2;
61 }
62 #[cfg(rpass2)]
63 struct Checksum2;
64
65 fn main() {}