Skip to content

Commit 71aae1d

Browse files
committed
Unpack type arguments for QueryLookup.
1 parent 03b5af2 commit 71aae1d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc/ty/query/plumbing.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'tcx, Q: QueryAccessors<'tcx>> QueryState<'tcx, Q> {
7474

7575
let shard = self.shards.get_shard_index_by_hash(key_hash);
7676
let lock = self.shards.get_shard_by_index(shard).lock();
77-
QueryLookup { key_hash, shard, lock }
77+
QueryLookupImpl { key_hash, shard, lock }
7878
}
7979
}
8080

@@ -115,10 +115,11 @@ impl<'tcx, M: QueryAccessors<'tcx>> Default for QueryState<'tcx, M> {
115115
}
116116

117117
/// Values used when checking a query cache which can be reused on a cache-miss to execute the query.
118-
pub(crate) struct QueryLookup<'tcx, Q: QueryAccessors<'tcx>> {
118+
pub(crate) type QueryLookup<'tcx, Q> = QueryLookupImpl<'tcx, QueryStateShard<'tcx, Q>>;
119+
pub(crate) struct QueryLookupImpl<'tcx, QSS> {
119120
pub(super) key_hash: u64,
120121
pub(super) shard: usize,
121-
pub(super) lock: LockGuard<'tcx, QueryStateShard<'tcx, Q>>,
122+
pub(super) lock: LockGuard<'tcx, QSS>,
122123
}
123124

124125
/// A type representing the responsibility to execute the job in the `job` field.

0 commit comments

Comments
 (0)