@@ -61,7 +61,6 @@ use crate::arena::Arena;
61
61
use crate :: dep_graph:: { DepGraph , DepKindStruct } ;
62
62
use crate :: infer:: canonical:: { CanonicalParamEnvCache , CanonicalVarInfo , CanonicalVarInfos } ;
63
63
use crate :: lint:: lint_level;
64
- use crate :: metadata:: ModChild ;
65
64
use crate :: middle:: codegen_fn_attrs:: CodegenFnAttrs ;
66
65
use crate :: middle:: { resolve_bound_vars, stability} ;
67
66
use crate :: mir:: interpret:: { self , Allocation , ConstAllocation } ;
@@ -3154,19 +3153,6 @@ impl<'tcx> TyCtxt<'tcx> {
3154
3153
self . opt_rpitit_info ( def_id) . is_some ( )
3155
3154
}
3156
3155
3157
- /// Named module children from all kinds of items, including imports.
3158
- /// In addition to regular items this list also includes struct and variant constructors, and
3159
- /// items inside `extern {}` blocks because all of them introduce names into parent module.
3160
- ///
3161
- /// Module here is understood in name resolution sense - it can be a `mod` item,
3162
- /// or a crate root, or an enum, or a trait.
3163
- ///
3164
- /// This is not a query, making it a query causes perf regressions
3165
- /// (probably due to hashing spans in `ModChild`ren).
3166
- pub fn module_children_local ( self , def_id : LocalDefId ) -> & ' tcx [ ModChild ] {
3167
- self . resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] )
3168
- }
3169
-
3170
3156
pub fn resolver_for_lowering ( self ) -> & ' tcx Steal < ( ty:: ResolverAstLowering , Lrc < ast:: Crate > ) > {
3171
3157
self . resolver_for_lowering_raw ( ( ) ) . 0
3172
3158
}
@@ -3222,6 +3208,8 @@ pub struct DeducedParamAttrs {
3222
3208
}
3223
3209
3224
3210
pub fn provide ( providers : & mut Providers ) {
3211
+ providers. module_children_local =
3212
+ |tcx, def_id| tcx. resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] ) ;
3225
3213
providers. maybe_unused_trait_imports =
3226
3214
|tcx, ( ) | & tcx. resolutions ( ( ) ) . maybe_unused_trait_imports ;
3227
3215
providers. names_imported_by_glob_use = |tcx, id| {
0 commit comments