Remove <CTX: QueryContext> in a bunch of places.

It was only needed by `find_cycle_in_stack()` in job.rs, but needed to be forwarded through dozens of types.
This commit is contained in:
Julian Wollersberger 2020-10-12 16:29:41 +02:00
parent 39b0e79285
commit 52cedcab92
8 changed files with 211 additions and 167 deletions

View file

@ -15,8 +15,8 @@ mod config;
pub use self::config::{QueryAccessors, QueryConfig, QueryDescription};
use crate::dep_graph::{DepContext, DepGraph};
use crate::query::job::QueryMap;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::HashStable;
use rustc_data_structures::sync::Lock;
use rustc_data_structures::thin_vec::ThinVec;
@ -38,9 +38,7 @@ pub trait QueryContext: DepContext {
/// Get the query information from the TLS context.
fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>>;
fn try_collect_active_jobs(
&self,
) -> Option<FxHashMap<QueryJobId<Self::DepKind>, QueryJobInfo<Self>>>;
fn try_collect_active_jobs(&self) -> Option<QueryMap<Self::DepKind, Self::Query>>;
/// Executes a job by changing the `ImplicitCtxt` to point to the
/// new query job while it executes. It returns the diagnostics