diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-12-26 16:36:55 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-20 22:53:46 +0100 |
| commit | 0144d6a3b7e2f2bba4c7cc9adc04c2b6e4e01b93 (patch) | |
| tree | 4c62d947153b9d07ab6891cdc4c37d50129d021e /compiler/rustc_query_system/src/query/plumbing.rs | |
| parent | f96e960ccfa92895217562ede43043405194eab0 (diff) | |
| download | rust-0144d6a3b7e2f2bba4c7cc9adc04c2b6e4e01b93.tar.gz rust-0144d6a3b7e2f2bba4c7cc9adc04c2b6e4e01b93.zip | |
Do not hold query key in Query.
Diffstat (limited to 'compiler/rustc_query_system/src/query/plumbing.rs')
| -rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index fdc73dcc540..dbe7c4c2320 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -119,10 +119,11 @@ where shards.iter().all(|shard| shard.active.is_empty()) } - pub fn try_collect_active_jobs( + pub fn try_collect_active_jobs<CTX: Copy>( &self, + tcx: CTX, kind: D, - make_query: fn(K) -> Q, + make_query: fn(CTX, K) -> Q, jobs: &mut QueryMap<D, Q>, ) -> Option<()> { // We use try_lock_shards here since we are called from the @@ -133,7 +134,7 @@ where shard.active.iter().filter_map(move |(k, v)| { if let QueryResult::Started(ref job) = *v { let id = QueryJobId::new(job.id, shard_id, kind); - let info = QueryInfo { span: job.span, query: make_query(k.clone()) }; + let info = QueryInfo { span: job.span, query: make_query(tcx, k.clone()) }; Some((id, QueryJobInfo { info, job: job.clone() })) } else { None |
