@@ -67,7 +67,7 @@ use rustc_errors::ErrorGuaranteed;
67
67
use rustc_hir as hir;
68
68
use rustc_hir:: def:: { DefKind , DocLinkResMap } ;
69
69
use rustc_hir:: def_id:: {
70
- CrateNum , DefId , DefIdMap , DefIdSet , LocalDefId , LocalDefIdMap , LocalDefIdSet ,
70
+ CrateNum , DefId , DefIdMap , DefIdSet , LocalDefId , LocalDefIdMap , LocalDefIdSet , LocalModDefId ,
71
71
} ;
72
72
use rustc_hir:: lang_items:: { LangItem , LanguageItems } ;
73
73
use rustc_hir:: { Crate , ItemLocalId , TraitCandidate } ;
@@ -167,7 +167,7 @@ rustc_queries! {
167
167
///
168
168
/// This can be conveniently accessed by `tcx.hir().visit_item_likes_in_module`.
169
169
/// Avoid calling this query directly.
170
- query hir_module_items( key: LocalDefId ) -> & ' tcx rustc_middle:: hir:: ModuleItems {
170
+ query hir_module_items( key: LocalModDefId ) -> & ' tcx rustc_middle:: hir:: ModuleItems {
171
171
arena_cache
172
172
desc { |tcx| "getting HIR module items in `{}`" , tcx. def_path_str( key) }
173
173
cache_on_disk_if { true }
@@ -896,7 +896,7 @@ rustc_queries! {
896
896
}
897
897
898
898
/// Performs lint checking for the module.
899
- query lint_mod( key: LocalDefId ) -> ( ) {
899
+ query lint_mod( key: LocalModDefId ) -> ( ) {
900
900
desc { |tcx| "linting {}" , describe_as_module( key, tcx) }
901
901
}
902
902
@@ -905,35 +905,35 @@ rustc_queries! {
905
905
}
906
906
907
907
/// Checks the attributes in the module.
908
- query check_mod_attrs( key: LocalDefId ) -> ( ) {
908
+ query check_mod_attrs( key: LocalModDefId ) -> ( ) {
909
909
desc { |tcx| "checking attributes in {}" , describe_as_module( key, tcx) }
910
910
}
911
911
912
912
/// Checks for uses of unstable APIs in the module.
913
- query check_mod_unstable_api_usage( key: LocalDefId ) -> ( ) {
913
+ query check_mod_unstable_api_usage( key: LocalModDefId ) -> ( ) {
914
914
desc { |tcx| "checking for unstable API usage in {}" , describe_as_module( key, tcx) }
915
915
}
916
916
917
917
/// Checks the const bodies in the module for illegal operations (e.g. `if` or `loop`).
918
- query check_mod_const_bodies( key: LocalDefId ) -> ( ) {
918
+ query check_mod_const_bodies( key: LocalModDefId ) -> ( ) {
919
919
desc { |tcx| "checking consts in {}" , describe_as_module( key, tcx) }
920
920
}
921
921
922
922
/// Checks the loops in the module.
923
- query check_mod_loops( key: LocalDefId ) -> ( ) {
923
+ query check_mod_loops( key: LocalModDefId ) -> ( ) {
924
924
desc { |tcx| "checking loops in {}" , describe_as_module( key, tcx) }
925
925
}
926
926
927
- query check_mod_naked_functions( key: LocalDefId ) -> ( ) {
927
+ query check_mod_naked_functions( key: LocalModDefId ) -> ( ) {
928
928
desc { |tcx| "checking naked functions in {}" , describe_as_module( key, tcx) }
929
929
}
930
930
931
- query check_mod_item_types( key: LocalDefId ) -> ( ) {
931
+ query check_mod_item_types( key: LocalModDefId ) -> ( ) {
932
932
desc { |tcx| "checking item types in {}" , describe_as_module( key, tcx) }
933
933
}
934
934
935
- query check_mod_privacy( key: LocalDefId ) -> ( ) {
936
- desc { |tcx| "checking privacy in {}" , describe_as_module( key, tcx) }
935
+ query check_mod_privacy( key: LocalModDefId ) -> ( ) {
936
+ desc { |tcx| "checking privacy in {}" , describe_as_module( key. to_local_def_id ( ) , tcx) }
937
937
}
938
938
939
939
query check_liveness( key: LocalDefId ) {
@@ -952,19 +952,19 @@ rustc_queries! {
952
952
desc { "finding live symbols in crate" }
953
953
}
954
954
955
- query check_mod_deathness( key: LocalDefId ) -> ( ) {
955
+ query check_mod_deathness( key: LocalModDefId ) -> ( ) {
956
956
desc { |tcx| "checking deathness of variables in {}" , describe_as_module( key, tcx) }
957
957
}
958
958
959
- query check_mod_impl_wf( key: LocalDefId ) -> ( ) {
959
+ query check_mod_impl_wf( key: LocalModDefId ) -> ( ) {
960
960
desc { |tcx| "checking that impls are well-formed in {}" , describe_as_module( key, tcx) }
961
961
}
962
962
963
- query check_mod_type_wf( key: LocalDefId ) -> ( ) {
963
+ query check_mod_type_wf( key: LocalModDefId ) -> ( ) {
964
964
desc { |tcx| "checking that types are well-formed in {}" , describe_as_module( key, tcx) }
965
965
}
966
966
967
- query collect_mod_item_types( key: LocalDefId ) -> ( ) {
967
+ query collect_mod_item_types( key: LocalModDefId ) -> ( ) {
968
968
desc { |tcx| "collecting item types in {}" , describe_as_module( key, tcx) }
969
969
}
970
970
0 commit comments