@@ -8,7 +8,6 @@ use crate::arena::Arena;
8
8
use crate :: dep_graph:: { DepGraph , DepKindStruct } ;
9
9
use crate :: infer:: canonical:: CanonicalVarInfo ;
10
10
use crate :: lint:: struct_lint_level;
11
- use crate :: metadata:: ModChild ;
12
11
use crate :: middle:: codegen_fn_attrs:: CodegenFnAttrs ;
13
12
use crate :: middle:: resolve_bound_vars;
14
13
use crate :: middle:: stability;
@@ -2137,19 +2136,6 @@ impl<'tcx> TyCtxt<'tcx> {
2137
2136
self . opt_rpitit_info ( def_id) . is_some ( )
2138
2137
}
2139
2138
2140
- /// Named module children from all kinds of items, including imports.
2141
- /// In addition to regular items this list also includes struct and variant constructors, and
2142
- /// items inside `extern {}` blocks because all of them introduce names into parent module.
2143
- ///
2144
- /// Module here is understood in name resolution sense - it can be a `mod` item,
2145
- /// or a crate root, or an enum, or a trait.
2146
- ///
2147
- /// This is not a query, making it a query causes perf regressions
2148
- /// (probably due to hashing spans in `ModChild`ren).
2149
- pub fn module_children_local ( self , def_id : LocalDefId ) -> & ' tcx [ ModChild ] {
2150
- self . resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] )
2151
- }
2152
-
2153
2139
pub fn metadata_dep_node ( self ) -> crate :: dep_graph:: DepNode {
2154
2140
crate :: dep_graph:: make_metadata ( self )
2155
2141
}
@@ -2171,6 +2157,8 @@ pub struct DeducedParamAttrs {
2171
2157
}
2172
2158
2173
2159
pub fn provide ( providers : & mut Providers ) {
2160
+ providers. module_children_local =
2161
+ |tcx, def_id| tcx. resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] ) ;
2174
2162
providers. maybe_unused_trait_imports =
2175
2163
|tcx, ( ) | & tcx. resolutions ( ( ) ) . maybe_unused_trait_imports ;
2176
2164
providers. names_imported_by_glob_use = |tcx, id| {
0 commit comments