Remove the check_mod_intrinsics query

This commit is contained in:
Oli Scherer 2022-04-13 14:49:03 +00:00
parent cb886cc164
commit 0fdaaadb36
6 changed files with 3 additions and 17 deletions

View File

@ -937,7 +937,6 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
//
// maybe move the check to a MIR pass?
tcx.ensure().check_mod_liveness(module);
tcx.ensure().check_mod_intrinsics(module);
});
});
}

View File

@ -804,10 +804,6 @@ rustc_queries! {
desc { |tcx| "checking privacy in {}", describe_as_module(key, tcx) }
}
query check_mod_intrinsics(key: LocalDefId) -> () {
desc { |tcx| "checking intrinsics in {}", describe_as_module(key, tcx) }
}
query check_mod_liveness(key: LocalDefId) -> () {
desc { |tcx| "checking liveness of variables in {}", describe_as_module(key, tcx) }
}

View File

@ -30,7 +30,6 @@ mod diagnostic_items;
pub mod entry;
pub mod hir_id_validator;
pub mod hir_stats;
mod intrinsicck;
mod lang_items;
pub mod layout_test;
mod lib_features;
@ -54,7 +53,6 @@ pub fn provide(providers: &mut Providers) {
loops::provide(providers);
naked_functions::provide(providers);
liveness::provide(providers);
intrinsicck::provide(providers);
reachable::provide(providers);
stability::provide(providers);
upvars::provide(providers);

View File

@ -4,25 +4,16 @@ use rustc_data_structures::stable_set::FxHashSet;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::def_id::DefId;
use rustc_hir::intravisit::{self, Visitor};
use rustc_index::vec::Idx;
use rustc_middle::ty::layout::{LayoutError, SizeSkeleton};
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::{self, FloatTy, IntTy, Ty, TyCtxt, UintTy};
use rustc_session::lint;
use rustc_span::{sym, Span, Symbol, DUMMY_SP};
use rustc_target::abi::{Pointer, VariantIdx};
use rustc_target::asm::{InlineAsmRegOrRegClass, InlineAsmType};
fn check_mod_intrinsics(tcx: TyCtxt<'_>, module_def_id: LocalDefId) {
tcx.hir().deep_visit_item_likes_in_module(module_def_id, &mut ItemVisitor { tcx });
}
pub fn provide(providers: &mut Providers) {
*providers = Providers { check_mod_intrinsics, ..*providers };
}
struct ItemVisitor<'tcx> {
tcx: TyCtxt<'tcx>,
}

View File

@ -81,6 +81,7 @@ mod gather_locals;
mod generator_interior;
mod inherited;
pub mod intrinsic;
mod intrinsicck;
pub mod method;
mod op;
mod pat;

View File

@ -63,6 +63,7 @@ This API is completely unstable and subject to change.
#![feature(hash_drain_filter)]
#![feature(if_let_guard)]
#![feature(is_sorted)]
#![feature(iter_intersperse)]
#![feature(label_break_value)]
#![feature(let_chains)]
#![feature(let_else)]