Move expansion of query macros in rustc_middle to rustc_middle::query

This commit is contained in:
John Kåre Alsaker
2023-05-15 06:24:45 +02:00
parent a14d6961f9
commit fff20a703d
102 changed files with 257 additions and 222 deletions

View File

@@ -4,6 +4,7 @@ use rustc_hir::def_id::DefId;
use rustc_hir::lang_items::LangItem;
use rustc_infer::traits::util::PredicateSet;
use rustc_infer::traits::ImplSource;
use rustc_middle::query::Providers;
use rustc_middle::ty::visit::TypeVisitableExt;
use rustc_middle::ty::InternalSubsts;
use rustc_middle::ty::{self, GenericParamDefKind, ToPredicate, Ty, TyCtxt, VtblEntry};
@@ -379,8 +380,8 @@ pub(crate) fn count_own_vtable_entries<'tcx>(
tcx.own_existential_vtable_entries(trait_ref.def_id()).len()
}
pub(super) fn provide(providers: &mut ty::query::Providers) {
*providers = ty::query::Providers {
pub(super) fn provide(providers: &mut Providers) {
*providers = Providers {
own_existential_vtable_entries,
vtable_entries,
vtable_trait_upcasting_coercion_new_vptr_slot,