mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Move HashResult.
It's the only thing left in `rustc_query_system::query::dispatcher`.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
use std::ops::Deref;
|
||||
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::sync::{AtomicU64, WorkerLocal};
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::hir_id::OwnerId;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_query_system::dep_graph::{DepNodeIndex, SerializedDepNodeIndex};
|
||||
use rustc_query_system::ich::StableHashingContext;
|
||||
pub(crate) use rustc_query_system::query::QueryJobId;
|
||||
use rustc_query_system::query::{CycleError, CycleErrorHandling, HashResult, QueryCache};
|
||||
use rustc_query_system::query::{CycleError, CycleErrorHandling, QueryCache};
|
||||
use rustc_span::{ErrorGuaranteed, Span};
|
||||
pub use sealed::IntoQueryParam;
|
||||
|
||||
@@ -30,6 +32,8 @@
|
||||
pub type IsLoadableFromDiskFn<'tcx, Key> =
|
||||
fn(tcx: TyCtxt<'tcx>, key: &Key, index: SerializedDepNodeIndex) -> bool;
|
||||
|
||||
pub type HashResult<V> = Option<fn(&mut StableHashingContext<'_>, &V) -> Fingerprint>;
|
||||
|
||||
/// Stores function pointers and other metadata for a particular query.
|
||||
///
|
||||
/// Used indirectly by query plumbing in `rustc_query_system` via a trait,
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
};
|
||||
use rustc_middle::query::AsLocalKey;
|
||||
use rustc_middle::query::on_disk_cache::{CacheEncoder, EncodedDepNodeIndex, OnDiskCache};
|
||||
use rustc_middle::query::plumbing::{QuerySystem, QuerySystemFns, QueryVTable};
|
||||
use rustc_middle::query::plumbing::{HashResult, QuerySystem, QuerySystemFns, QueryVTable};
|
||||
use rustc_middle::query::values::Value;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_query_system::dep_graph::SerializedDepNodeIndex;
|
||||
use rustc_query_system::query::{
|
||||
CycleError, CycleErrorHandling, HashResult, QueryCache, QueryMap, QueryMode, QueryState,
|
||||
CycleError, CycleErrorHandling, QueryCache, QueryMap, QueryMode, QueryState,
|
||||
};
|
||||
use rustc_span::{ErrorGuaranteed, Span};
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
|
||||
use crate::ich::StableHashingContext;
|
||||
|
||||
pub type HashResult<V> = Option<fn(&mut StableHashingContext<'_>, &V) -> Fingerprint>;
|
||||
@@ -15,7 +15,6 @@
|
||||
pub use self::caches::{
|
||||
DefIdCache, DefaultCache, QueryCache, QueryCacheKey, SingleCache, VecCache,
|
||||
};
|
||||
pub use self::dispatcher::HashResult;
|
||||
pub use self::job::{
|
||||
QueryInfo, QueryJob, QueryJobId, QueryJobInfo, QueryLatch, QueryMap, break_query_cycles,
|
||||
print_query_stack, report_cycle,
|
||||
@@ -24,7 +23,6 @@
|
||||
use crate::dep_graph::{DepKind, DepNodeIndex, HasDepContext, SerializedDepNodeIndex};
|
||||
|
||||
mod caches;
|
||||
mod dispatcher;
|
||||
mod job;
|
||||
mod plumbing;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user