]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-type-bounds/traits-assoc-anonymized.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / associated-type-bounds / traits-assoc-anonymized.rs
CommitLineData
6a06907d
XL
1// check-pass
2
3pub struct LookupInternedStorage;
4
5impl<Q> QueryStorageOps<Q> for LookupInternedStorage
6where
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
15pub trait HasQueryGroup<G> {
16 fn group_storage(&self);
17}
18
19pub trait QueryStorageOps<Q>
20where
21 Q: Query,
22{
23 fn fmt_index(&self, db: &<Q as QueryDb<'_>>::DynDb);
24}
25
26pub trait QueryDb<'d> {
27 type DynDb: HasQueryGroup<Self::Group> + 'd;
28 type Group;
29}
30
31pub trait Query: for<'d> QueryDb<'d> {}
32
33fn main() {}