Rollup merge of #48939 - wesleywiser:incr_query_wf_checking, r=michaelwoerister
Querify WF-checking so it can be cached r? @michaelwoerister
This commit is contained in:
@@ -579,6 +579,9 @@ define_dep_nodes!( <'tcx>
|
|||||||
[] GetPanicStrategy(CrateNum),
|
[] GetPanicStrategy(CrateNum),
|
||||||
[] IsNoBuiltins(CrateNum),
|
[] IsNoBuiltins(CrateNum),
|
||||||
[] ImplDefaultness(DefId),
|
[] ImplDefaultness(DefId),
|
||||||
|
[] CheckItemWellFormed(DefId),
|
||||||
|
[] CheckTraitItemWellFormed(DefId),
|
||||||
|
[] CheckImplItemWellFormed(DefId),
|
||||||
[] ReachableNonGenerics(CrateNum),
|
[] ReachableNonGenerics(CrateNum),
|
||||||
[] NativeLibraries(CrateNum),
|
[] NativeLibraries(CrateNum),
|
||||||
[] PluginRegistrarFn(CrateNum),
|
[] PluginRegistrarFn(CrateNum),
|
||||||
|
|||||||
@@ -299,6 +299,10 @@ define_maps! { <'tcx>
|
|||||||
|
|
||||||
[] fn impl_defaultness: ImplDefaultness(DefId) -> hir::Defaultness,
|
[] fn impl_defaultness: ImplDefaultness(DefId) -> hir::Defaultness,
|
||||||
|
|
||||||
|
[] fn check_item_well_formed: CheckItemWellFormed(DefId) -> (),
|
||||||
|
[] fn check_trait_item_well_formed: CheckTraitItemWellFormed(DefId) -> (),
|
||||||
|
[] fn check_impl_item_well_formed: CheckImplItemWellFormed(DefId) -> (),
|
||||||
|
|
||||||
// The DefIds of all non-generic functions and statics in the given crate
|
// The DefIds of all non-generic functions and statics in the given crate
|
||||||
// that can be reached from outside the crate.
|
// that can be reached from outside the crate.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -871,6 +871,9 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
|
|||||||
DepKind::GetPanicStrategy => { force!(panic_strategy, krate!()); }
|
DepKind::GetPanicStrategy => { force!(panic_strategy, krate!()); }
|
||||||
DepKind::IsNoBuiltins => { force!(is_no_builtins, krate!()); }
|
DepKind::IsNoBuiltins => { force!(is_no_builtins, krate!()); }
|
||||||
DepKind::ImplDefaultness => { force!(impl_defaultness, def_id!()); }
|
DepKind::ImplDefaultness => { force!(impl_defaultness, def_id!()); }
|
||||||
|
DepKind::CheckItemWellFormed => { force!(check_item_well_formed, def_id!()); }
|
||||||
|
DepKind::CheckTraitItemWellFormed => { force!(check_trait_item_well_formed, def_id!()); }
|
||||||
|
DepKind::CheckImplItemWellFormed => { force!(check_impl_item_well_formed, def_id!()); }
|
||||||
DepKind::ReachableNonGenerics => { force!(reachable_non_generics, krate!()); }
|
DepKind::ReachableNonGenerics => { force!(reachable_non_generics, krate!()); }
|
||||||
DepKind::NativeLibraries => { force!(native_libraries, krate!()); }
|
DepKind::NativeLibraries => { force!(native_libraries, krate!()); }
|
||||||
DepKind::PluginRegistrarFn => { force!(plugin_registrar_fn, krate!()); }
|
DepKind::PluginRegistrarFn => { force!(plugin_registrar_fn, krate!()); }
|
||||||
|
|||||||
@@ -718,6 +718,18 @@ fn typeck_item_bodies<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, crate_num: CrateNum
|
|||||||
})?)
|
})?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn check_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
|
||||||
|
wfcheck::check_item_well_formed(tcx, def_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn check_trait_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
|
||||||
|
wfcheck::check_trait_item(tcx, def_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn check_impl_item_well_formed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
|
||||||
|
wfcheck::check_impl_item(tcx, def_id);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn provide(providers: &mut Providers) {
|
pub fn provide(providers: &mut Providers) {
|
||||||
*providers = Providers {
|
*providers = Providers {
|
||||||
typeck_item_bodies,
|
typeck_item_bodies,
|
||||||
@@ -725,6 +737,9 @@ pub fn provide(providers: &mut Providers) {
|
|||||||
has_typeck_tables,
|
has_typeck_tables,
|
||||||
adt_destructor,
|
adt_destructor,
|
||||||
used_trait_imports,
|
used_trait_imports,
|
||||||
|
check_item_well_formed,
|
||||||
|
check_trait_item_well_formed,
|
||||||
|
check_impl_item_well_formed,
|
||||||
..*providers
|
..*providers
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user