]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/traits-assoc-anonymized.rs
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / associated-type-bounds / traits-assoc-anonymized.rs
1 // check-pass
2
3 pub struct LookupInternedStorage;
4
5 impl<Q> QueryStorageOps<Q> for LookupInternedStorage
6 where
7     Q: Query,
8     for<'d> Q: QueryDb<'d>,
9 {
10     fn fmt_index(&self, db: &<Q as QueryDb<'_>>::DynDb) {
11         <<Q as QueryDb<'_>>::DynDb as HasQueryGroup<Q::Group>>::group_storage(db);
12     }
13 }
14
15 pub trait HasQueryGroup<G> {
16     fn group_storage(&self);
17 }
18
19 pub trait QueryStorageOps<Q>
20 where
21     Q: Query,
22 {
23     fn fmt_index(&self, db: &<Q as QueryDb<'_>>::DynDb);
24 }
25
26 pub trait QueryDb<'d> {
27     type DynDb: HasQueryGroup<Self::Group> + 'd;
28     type Group;
29 }
30
31 pub trait Query: for<'d> QueryDb<'d> {}
32
33 fn main() {}