diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-06 19:54:19 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-16 09:36:28 +0100 |
| commit | 486a082c58c60959328e0b394f9e58850b3c6341 (patch) | |
| tree | 5d3257692f3d0d9a8fbffc42229e2566c904e368 | |
| parent | b08943358ec8adc2d8e542659c7dcd2514311918 (diff) | |
| download | rust-486a082c58c60959328e0b394f9e58850b3c6341.tar.gz rust-486a082c58c60959328e0b394f9e58850b3c6341.zip | |
Unpack type arguments for QueryLookup.
| -rw-r--r-- | src/librustc/ty/query/plumbing.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index b688365b2bb..67f0fdfcd54 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -74,7 +74,7 @@ impl<'tcx, Q: QueryAccessors<'tcx>> QueryState<'tcx, Q> { let shard = self.shards.get_shard_index_by_hash(key_hash); let lock = self.shards.get_shard_by_index(shard).lock(); - QueryLookup { key_hash, shard, lock } + QueryLookupImpl { key_hash, shard, lock } } } @@ -115,10 +115,11 @@ impl<'tcx, M: QueryAccessors<'tcx>> Default for QueryState<'tcx, M> { } /// Values used when checking a query cache which can be reused on a cache-miss to execute the query. -pub(crate) struct QueryLookup<'tcx, Q: QueryAccessors<'tcx>> { +pub(crate) type QueryLookup<'tcx, Q> = QueryLookupImpl<'tcx, QueryStateShard<'tcx, Q>>; +pub(crate) struct QueryLookupImpl<'tcx, QSS> { pub(super) key_hash: u64, pub(super) shard: usize, - pub(super) lock: LockGuard<'tcx, QueryStateShard<'tcx, Q>>, + pub(super) lock: LockGuard<'tcx, QSS>, } /// A type representing the responsibility to execute the job in the `job` field. |
