Move provider fields back to rustc_query_impl
This commit is contained in:
parent
265e1e968d
commit
067bf2ac13
7 changed files with 28 additions and 39 deletions
|
@ -18,8 +18,6 @@ use crate::mir::{
|
|||
use crate::thir::Thir;
|
||||
use crate::traits;
|
||||
use crate::traits::solve::{ExternalConstraints, ExternalConstraintsData};
|
||||
use crate::ty::query::ExternProviders;
|
||||
use crate::ty::query::Providers;
|
||||
use crate::ty::query::{self, TyCtxtAt};
|
||||
use crate::ty::{
|
||||
self, AdtDef, AdtDefData, AdtKind, Binder, Const, ConstData, DefIdTree, FloatTy, FloatVar,
|
||||
|
@ -641,8 +639,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
untracked: Untracked,
|
||||
dep_graph: DepGraph,
|
||||
on_disk_cache: Option<&'tcx dyn OnDiskCache<'tcx>>,
|
||||
local_providers: Providers,
|
||||
extern_providers: ExternProviders,
|
||||
queries: &'tcx dyn query::QueryEngine<'tcx>,
|
||||
query_kinds: &'tcx [DepKindStruct<'tcx>],
|
||||
) -> GlobalCtxt<'tcx> {
|
||||
|
@ -668,7 +664,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
untracked,
|
||||
on_disk_cache,
|
||||
queries,
|
||||
query_system: query::QuerySystem::new(local_providers, extern_providers),
|
||||
query_system: Default::default(),
|
||||
query_kinds,
|
||||
ty_rcache: Default::default(),
|
||||
pred_rcache: Default::default(),
|
||||
|
|
|
@ -71,24 +71,12 @@ use std::sync::Arc;
|
|||
pub(crate) use rustc_query_system::query::QueryJobId;
|
||||
use rustc_query_system::query::*;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct QuerySystem<'tcx> {
|
||||
pub local_providers: Box<Providers>,
|
||||
pub extern_providers: Box<ExternProviders>,
|
||||
pub arenas: QueryArenas<'tcx>,
|
||||
pub caches: QueryCaches<'tcx>,
|
||||
}
|
||||
|
||||
impl<'tcx> QuerySystem<'tcx> {
|
||||
pub fn new(local_providers: Providers, extern_providers: ExternProviders) -> Self {
|
||||
QuerySystem {
|
||||
local_providers: Box::new(local_providers),
|
||||
extern_providers: Box::new(extern_providers),
|
||||
arenas: Default::default(),
|
||||
caches: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct TyCtxtAt<'tcx> {
|
||||
pub tcx: TyCtxt<'tcx>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue