diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-09-15 15:39:11 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-09-21 17:06:14 +0200 |
| commit | 1806efe7f2757c5fbcf99d1ac9ca2d26fb0a7c4e (patch) | |
| tree | 261c5f818f32a5c4ccc366874279d766c8f66a2f /compiler/rustc_query_system/src/query/mod.rs | |
| parent | 66ab7e6883c563ceacf8386a50e851e9855cd6b4 (diff) | |
| download | rust-1806efe7f2757c5fbcf99d1ac9ca2d26fb0a7c4e.tar.gz rust-1806efe7f2757c5fbcf99d1ac9ca2d26fb0a7c4e.zip | |
Move `DepKind` to `rustc_query_system` and define it as `u16`
Diffstat (limited to 'compiler/rustc_query_system/src/query/mod.rs')
| -rw-r--r-- | compiler/rustc_query_system/src/query/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_query_system/src/query/mod.rs b/compiler/rustc_query_system/src/query/mod.rs index f7619d75be7..05dee9f12db 100644 --- a/compiler/rustc_query_system/src/query/mod.rs +++ b/compiler/rustc_query_system/src/query/mod.rs @@ -28,27 +28,27 @@ use thin_vec::ThinVec; /// /// This is mostly used in case of cycles for error reporting. #[derive(Clone, Debug)] -pub struct QueryStackFrame<D: DepKind> { +pub struct QueryStackFrame { pub description: String, span: Option<Span>, pub def_id: Option<DefId>, pub def_kind: Option<DefKind>, pub ty_adt_id: Option<DefId>, - pub dep_kind: D, + pub dep_kind: DepKind, /// This hash is used to deterministically pick /// a query to remove cycles in the parallel compiler. #[cfg(parallel_compiler)] hash: Hash64, } -impl<D: DepKind> QueryStackFrame<D> { +impl QueryStackFrame { #[inline] pub fn new( description: String, span: Option<Span>, def_id: Option<DefId>, def_kind: Option<DefKind>, - dep_kind: D, + dep_kind: DepKind, ty_adt_id: Option<DefId>, _hash: impl FnOnce() -> Hash64, ) -> Self { @@ -106,7 +106,7 @@ pub trait QueryContext: HasDepContext { /// Get the query information from the TLS context. fn current_query_job(self) -> Option<QueryJobId>; - fn try_collect_active_jobs(self) -> Option<QueryMap<Self::DepKind>>; + fn try_collect_active_jobs(self) -> Option<QueryMap>; /// Load side effects associated to the node in the previous session. fn load_side_effects(self, prev_dep_node_index: SerializedDepNodeIndex) -> QuerySideEffects; |
