@@ -63,7 +63,6 @@ use crate::arena::Arena;
63
63
use crate :: dep_graph:: { DepGraph , DepKindStruct } ;
64
64
use crate :: infer:: canonical:: { CanonicalParamEnvCache , CanonicalVarKind , CanonicalVarKinds } ;
65
65
use crate :: lint:: lint_level;
66
- use crate :: metadata:: ModChild ;
67
66
use crate :: middle:: codegen_fn_attrs:: { CodegenFnAttrs , TargetFeature } ;
68
67
use crate :: middle:: { resolve_bound_vars, stability} ;
69
68
use crate :: mir:: interpret:: { self , Allocation , ConstAllocation } ;
@@ -3373,19 +3372,6 @@ impl<'tcx> TyCtxt<'tcx> {
3373
3372
self . opt_rpitit_info ( def_id) . is_some ( )
3374
3373
}
3375
3374
3376
- /// Named module children from all kinds of items, including imports.
3377
- /// In addition to regular items this list also includes struct and variant constructors, and
3378
- /// items inside `extern {}` blocks because all of them introduce names into parent module.
3379
- ///
3380
- /// Module here is understood in name resolution sense - it can be a `mod` item,
3381
- /// or a crate root, or an enum, or a trait.
3382
- ///
3383
- /// This is not a query, making it a query causes perf regressions
3384
- /// (probably due to hashing spans in `ModChild`ren).
3385
- pub fn module_children_local ( self , def_id : LocalDefId ) -> & ' tcx [ ModChild ] {
3386
- self . resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] )
3387
- }
3388
-
3389
3375
pub fn resolver_for_lowering ( self ) -> & ' tcx Steal < ( ty:: ResolverAstLowering , Arc < ast:: Crate > ) > {
3390
3376
self . resolver_for_lowering_raw ( ( ) ) . 0
3391
3377
}
@@ -3437,6 +3423,8 @@ pub struct DeducedParamAttrs {
3437
3423
}
3438
3424
3439
3425
pub fn provide ( providers : & mut Providers ) {
3426
+ providers. module_children_local =
3427
+ |tcx, def_id| tcx. resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] ) ;
3440
3428
providers. maybe_unused_trait_imports =
3441
3429
|tcx, ( ) | & tcx. resolutions ( ( ) ) . maybe_unused_trait_imports ;
3442
3430
providers. names_imported_by_glob_use = |tcx, id| {
0 commit comments