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

@@ -21,6 +21,7 @@ use crate::error::{OpaqueHiddenTypeMismatch, TypeMismatchReason};
use crate::metadata::ModChild;
use crate::middle::privacy::EffectiveVisibilities;
use crate::mir::{Body, GeneratorLayout};
use crate::query::Providers;
use crate::traits::{self, Reveal};
use crate::ty;
use crate::ty::fast_reject::SimplifiedType;
@@ -121,6 +122,7 @@ pub mod inhabitedness;
pub mod layout;
pub mod normalize_erasing_regions;
pub mod print;
#[macro_use]
pub mod query;
pub mod relate;
pub mod subst;
@@ -2590,7 +2592,7 @@ pub fn ast_uint_ty(uty: UintTy) -> ast::UintTy {
}
}
pub fn provide(providers: &mut ty::query::Providers) {
pub fn provide(providers: &mut Providers) {
closure::provide(providers);
context::provide(providers);
erase_regions::provide(providers);
@@ -2599,7 +2601,7 @@ pub fn provide(providers: &mut ty::query::Providers) {
print::provide(providers);
super::util::bug::provide(providers);
super::middle::provide(providers);
*providers = ty::query::Providers {
*providers = Providers {
trait_impls_of: trait_def::trait_impls_of_provider,
incoherent_impls: trait_def::incoherent_impls_provider,
const_param_default: consts::const_param_default,