mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #153942 - Zalathar:imports, r=nnethercote
Re-export `rustc_middle::query::{QuerySystem, QueryVTable}`
- Follow-up to https://github.com/rust-lang/rust/pull/153760#discussion_r2928848418.
---
All of the other public items in `rustc_middle::query::plumbing` are re-exported from `query`, except for these two, for no particular reason that I can see.
Re-exporting them allows `rustc_middle::query::plumbing` to have its visibility reduced to pub(crate).
Imports within `rustc_middle` have also been updated to consistently use the re-exports in `crate::query`.
r? nnethercote
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
use crate::dep_graph;
|
||||
use crate::dep_graph::DepNodeKey;
|
||||
use crate::query::erase::{self, Erasable, Erased};
|
||||
use crate::query::plumbing::QueryVTable;
|
||||
use crate::query::{EnsureMode, QueryCache, QueryMode};
|
||||
use crate::query::{EnsureMode, QueryCache, QueryMode, QueryVTable};
|
||||
use crate::ty::TyCtxt;
|
||||
|
||||
/// Checks whether there is already a value for this key in the in-memory
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
use parking_lot::{Condvar, Mutex};
|
||||
use rustc_span::Span;
|
||||
|
||||
use crate::query::plumbing::CycleError;
|
||||
use crate::query::CycleError;
|
||||
use crate::ty::TyCtxt;
|
||||
|
||||
/// A value uniquely identifying an active query job.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
pub use self::job::{QueryJob, QueryJobId, QueryLatch, QueryWaiter};
|
||||
pub use self::keys::{AsLocalQueryKey, LocalCrate, QueryKey};
|
||||
pub use self::plumbing::{
|
||||
ActiveKeyStatus, CycleError, EnsureMode, IntoQueryParam, QueryMode, QueryState, TyCtxtAt,
|
||||
TyCtxtEnsureDone, TyCtxtEnsureOk, TyCtxtEnsureResult,
|
||||
ActiveKeyStatus, CycleError, EnsureMode, IntoQueryParam, QueryMode, QueryState, QuerySystem,
|
||||
QueryVTable, TyCtxtAt, TyCtxtEnsureDone, TyCtxtEnsureOk, TyCtxtEnsureResult,
|
||||
};
|
||||
pub use self::stack::QueryStackFrame;
|
||||
pub use crate::queries::Providers;
|
||||
@@ -19,7 +19,7 @@
|
||||
mod keys;
|
||||
pub(crate) mod modifiers;
|
||||
pub mod on_disk_cache;
|
||||
pub mod plumbing;
|
||||
pub(crate) mod plumbing;
|
||||
mod stack;
|
||||
|
||||
pub fn describe_as_module(def_id: impl Into<LocalDefId>, tcx: TyCtxt<'_>) -> String {
|
||||
|
||||
@@ -569,7 +569,7 @@ fn inner<'tcx>(key: &impl crate::query::QueryKey, tcx: TyCtxt<'tcx>) -> Option<D
|
||||
/// Holds a `QueryVTable` for each query.
|
||||
pub struct QueryVTables<'tcx> {
|
||||
$(
|
||||
pub $name: ::rustc_middle::query::plumbing::QueryVTable<'tcx, $name::Cache<'tcx>>,
|
||||
pub $name: crate::query::QueryVTable<'tcx, $name::Cache<'tcx>>,
|
||||
)*
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,7 @@
|
||||
use crate::middle::resolve_bound_vars;
|
||||
use crate::mir::interpret::{self, Allocation, ConstAllocation};
|
||||
use crate::mir::{Body, Local, Place, PlaceElem, ProjectionKind, Promoted};
|
||||
use crate::query::plumbing::QuerySystem;
|
||||
use crate::query::{IntoQueryParam, LocalCrate, Providers, TyCtxtAt};
|
||||
use crate::query::{IntoQueryParam, LocalCrate, Providers, QuerySystem, TyCtxtAt};
|
||||
use crate::thir::Thir;
|
||||
use crate::traits;
|
||||
use crate::traits::solve::{ExternalConstraints, ExternalConstraintsData, PredefinedOpaques};
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
use rustc_data_structures::{outline, sharded, sync};
|
||||
use rustc_errors::FatalError;
|
||||
use rustc_middle::dep_graph::{DepGraphData, DepNodeKey, SerializedDepNodeIndex};
|
||||
use rustc_middle::query::plumbing::QueryVTable;
|
||||
use rustc_middle::query::{
|
||||
ActiveKeyStatus, CycleError, EnsureMode, QueryCache, QueryJob, QueryJobId, QueryKey,
|
||||
QueryLatch, QueryMode, QueryState,
|
||||
QueryLatch, QueryMode, QueryState, QueryVTable,
|
||||
};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_middle::verify_ich::incremental_verify_ich;
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
use rustc_data_structures::sync::AtomicU64;
|
||||
use rustc_middle::dep_graph;
|
||||
use rustc_middle::queries::{ExternProviders, Providers};
|
||||
use rustc_middle::query::QueryCache;
|
||||
use rustc_middle::query::on_disk_cache::OnDiskCache;
|
||||
use rustc_middle::query::plumbing::{QuerySystem, QueryVTable};
|
||||
use rustc_middle::query::{QueryCache, QuerySystem, QueryVTable};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
||||
pub use crate::dep_kind_vtables::make_dep_kind_vtables;
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
use rustc_middle::query::on_disk_cache::{
|
||||
AbsoluteBytePos, CacheDecoder, CacheEncoder, EncodedDepNodeIndex,
|
||||
};
|
||||
use rustc_middle::query::plumbing::QueryVTable;
|
||||
use rustc_middle::query::{QueryCache, QueryJobId, QueryKey, QueryMode, QueryStackFrame, erase};
|
||||
use rustc_middle::query::{
|
||||
QueryCache, QueryJobId, QueryKey, QueryMode, QueryStackFrame, QueryVTable, erase,
|
||||
};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_middle::ty::codec::TyEncoder;
|
||||
use rustc_middle::ty::tls::{self, ImplicitCtxt};
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
use rustc_data_structures::profiling::SelfProfiler;
|
||||
use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LOCAL_CRATE, LocalDefId};
|
||||
use rustc_hir::definitions::DefPathData;
|
||||
use rustc_middle::query::QueryCache;
|
||||
use rustc_middle::query::plumbing::QueryVTable;
|
||||
use rustc_middle::query::{QueryCache, QueryVTable};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
||||
use crate::query_impl::for_each_query_vtable;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use rustc_middle::queries::TaggedQueryKey;
|
||||
use rustc_middle::query::erase::{self, Erased};
|
||||
use rustc_middle::query::plumbing::QueryVTable;
|
||||
use rustc_middle::query::{AsLocalQueryKey, QueryMode};
|
||||
use rustc_middle::query::{AsLocalQueryKey, QueryMode, QueryVTable};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::Span;
|
||||
|
||||
@@ -245,7 +244,7 @@ macro_rules! for_each_query_vtable {
|
||||
(ALL, $tcx:expr, $closure:expr) => {{
|
||||
let tcx: rustc_middle::ty::TyCtxt<'_> = $tcx;
|
||||
$(
|
||||
let query: &rustc_middle::query::plumbing::QueryVTable<'_, _> =
|
||||
let query: &rustc_middle::query::QueryVTable<'_, _> =
|
||||
&tcx.query_system.query_vtables.$name;
|
||||
$closure(query);
|
||||
)*
|
||||
@@ -260,7 +259,7 @@ macro_rules! for_each_query_vtable {
|
||||
$(
|
||||
#[cfg($cache_on_disk)]
|
||||
{
|
||||
let query: &rustc_middle::query::plumbing::QueryVTable<'_, _> =
|
||||
let query: &rustc_middle::query::QueryVTable<'_, _> =
|
||||
&tcx.query_system.query_vtables.$name;
|
||||
$closure(query);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user