-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Anonymize late bound regions on transitive bounds that define assoc type
- Loading branch information
1 parent
fd09255
commit 8d17c6a
Showing
2 changed files
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/test/ui/associated-type-bounds/traits-assoc-anonymized.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// check-pass | ||
|
||
pub struct LookupInternedStorage; | ||
|
||
impl<Q> QueryStorageOps<Q> for LookupInternedStorage | ||
where | ||
Q: Query, | ||
for<'d> Q: QueryDb<'d>, | ||
{ | ||
fn fmt_index(&self, db: &<Q as QueryDb<'_>>::DynDb) { | ||
<<Q as QueryDb<'_>>::DynDb as HasQueryGroup<Q::Group>>::group_storage(db); | ||
} | ||
} | ||
|
||
pub trait HasQueryGroup<G> { | ||
fn group_storage(&self); | ||
} | ||
|
||
pub trait QueryStorageOps<Q> | ||
where | ||
Q: Query, | ||
{ | ||
fn fmt_index(&self, db: &<Q as QueryDb<'_>>::DynDb); | ||
} | ||
|
||
pub trait QueryDb<'d> { | ||
type DynDb: HasQueryGroup<Self::Group> + 'd; | ||
type Group; | ||
} | ||
|
||
pub trait Query: for<'d> QueryDb<'d> {} | ||
|
||
fn main() {} |