@@ -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;
@@ -2114,19 +2113,6 @@ impl<'tcx> TyCtxt<'tcx> {
2114
2113
self . opt_rpitit_info ( def_id) . is_some ( )
2115
2114
}
2116
2115
2117
- /// Named module children from all kinds of items, including imports.
2118
- /// In addition to regular items this list also includes struct and variant constructors, and
2119
- /// items inside `extern {}` blocks because all of them introduce names into parent module.
2120
- ///
2121
- /// Module here is understood in name resolution sense - it can be a `mod` item,
2122
- /// or a crate root, or an enum, or a trait.
2123
- ///
2124
- /// This is not a query, making it a query causes perf regressions
2125
- /// (probably due to hashing spans in `ModChild`ren).
2126
- pub fn module_children_local ( self , def_id : LocalDefId ) -> & ' tcx [ ModChild ] {
2127
- self . resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] )
2128
- }
2129
-
2130
2116
pub fn metadata_dep_node ( self ) -> crate :: dep_graph:: DepNode {
2131
2117
crate :: dep_graph:: make_metadata ( self )
2132
2118
}
@@ -2148,6 +2134,8 @@ pub struct DeducedParamAttrs {
2148
2134
}
2149
2135
2150
2136
pub fn provide ( providers : & mut Providers ) {
2137
+ providers. module_children_local =
2138
+ |tcx, def_id| tcx. resolutions ( ( ) ) . module_children . get ( & def_id) . map_or ( & [ ] , |v| & v[ ..] ) ;
2151
2139
providers. maybe_unused_trait_imports =
2152
2140
|tcx, ( ) | & tcx. resolutions ( ( ) ) . maybe_unused_trait_imports ;
2153
2141
providers. names_imported_by_glob_use = |tcx, id| {
0 commit comments