@@ -62,7 +62,6 @@ use crate::arena::Arena;
62
62
use crate :: dep_graph:: { DepGraph , DepKindStruct } ;
63
63
use crate :: infer:: canonical:: { CanonicalParamEnvCache , CanonicalVarInfo , CanonicalVarInfos } ;
64
64
use crate :: lint:: lint_level;
65
- use crate :: metadata:: ModChild ;
66
65
use crate :: middle:: codegen_fn_attrs:: CodegenFnAttrs ;
67
66
use crate :: middle:: { resolve_bound_vars, stability} ;
68
67
use crate :: mir:: interpret:: { self , Allocation , ConstAllocation } ;
@@ -3138,19 +3137,6 @@ impl<'tcx> TyCtxt<'tcx> {
3138
3137
self . opt_rpitit_info ( def_id) . is_some ( )
3139
3138
}
3140
3139
3141
- /// Named module children from all kinds of items, including imports.
3142
- /// In addition to regular items this list also includes struct and variant constructors, and
3143
- /// items inside `extern {}` blocks because all of them introduce names into parent module.
3144
- ///
3145
- /// Module here is understood in name resolution sense - it can be a `mod` item,
3146
- /// or a crate root, or an enum, or a trait.
3147
- ///
3148
- /// This is not a query, making it a query causes perf regressions
3149
- /// (probably due to hashing spans in `ModChild`ren).
3150
- pub fn module_children_local ( self , def_id : LocalDefId ) -> & ' tcx [ ModChild ] {
3151
- self . resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] )
3152
- }
3153
-
3154
3140
pub fn resolver_for_lowering ( self ) -> & ' tcx Steal < ( ty:: ResolverAstLowering , Lrc < ast:: Crate > ) > {
3155
3141
self . resolver_for_lowering_raw ( ( ) ) . 0
3156
3142
}
@@ -3206,6 +3192,8 @@ pub struct DeducedParamAttrs {
3206
3192
}
3207
3193
3208
3194
pub fn provide ( providers : & mut Providers ) {
3195
+ providers. module_children_local =
3196
+ |tcx, def_id| tcx. resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] ) ;
3209
3197
providers. maybe_unused_trait_imports =
3210
3198
|tcx, ( ) | & tcx. resolutions ( ( ) ) . maybe_unused_trait_imports ;
3211
3199
providers. names_imported_by_glob_use = |tcx, id| {
0 commit comments