@@ -1225,6 +1225,7 @@ pub(super) fn hir_module_items(tcx: TyCtxt<'_>, module_id: LocalModDefId) -> Mod
12251225 body_owners,
12261226 opaques,
12271227 nested_bodies,
1228+ eiis,
12281229 ..
12291230 } = collector;
12301231 ModuleItems {
@@ -1238,6 +1239,7 @@ pub(super) fn hir_module_items(tcx: TyCtxt<'_>, module_id: LocalModDefId) -> Mod
12381239 opaques : opaques. into_boxed_slice ( ) ,
12391240 nested_bodies : nested_bodies. into_boxed_slice ( ) ,
12401241 delayed_lint_items : Box :: new ( [ ] ) ,
1242+ eiis : eiis. into_boxed_slice ( ) ,
12411243 }
12421244}
12431245
@@ -1260,6 +1262,7 @@ pub(crate) fn hir_crate_items(tcx: TyCtxt<'_>, _: ()) -> ModuleItems {
12601262 opaques,
12611263 nested_bodies,
12621264 mut delayed_lint_items,
1265+ eiis,
12631266 ..
12641267 } = collector;
12651268
@@ -1282,6 +1285,7 @@ pub(crate) fn hir_crate_items(tcx: TyCtxt<'_>, _: ()) -> ModuleItems {
12821285 opaques : opaques. into_boxed_slice ( ) ,
12831286 nested_bodies : nested_bodies. into_boxed_slice ( ) ,
12841287 delayed_lint_items : delayed_lint_items. into_boxed_slice ( ) ,
1288+ eiis : eiis. into_boxed_slice ( ) ,
12851289 }
12861290}
12871291
@@ -1299,6 +1303,7 @@ struct ItemCollector<'tcx> {
12991303 opaques : Vec < LocalDefId > ,
13001304 nested_bodies : Vec < LocalDefId > ,
13011305 delayed_lint_items : Vec < OwnerId > ,
1306+ eiis : Vec < LocalDefId > ,
13021307}
13031308
13041309impl < ' tcx > ItemCollector < ' tcx > {
@@ -1315,6 +1320,7 @@ impl<'tcx> ItemCollector<'tcx> {
13151320 opaques : Vec :: default ( ) ,
13161321 nested_bodies : Vec :: default ( ) ,
13171322 delayed_lint_items : Vec :: default ( ) ,
1323+ eiis : Vec :: default ( ) ,
13181324 }
13191325 }
13201326}
@@ -1336,6 +1342,12 @@ impl<'hir> Visitor<'hir> for ItemCollector<'hir> {
13361342 self . delayed_lint_items . push ( item. item_id ( ) . owner_id ) ;
13371343 }
13381344
1345+ if let ItemKind :: Static ( ..) | ItemKind :: Fn { .. } | ItemKind :: Macro ( ..) = & item. kind
1346+ && item. eii
1347+ {
1348+ self . eiis . push ( item. owner_id . def_id )
1349+ }
1350+
13391351 // Items that are modules are handled here instead of in visit_mod.
13401352 if let ItemKind :: Mod ( _, module) = & item. kind {
13411353 self . submodules . push ( item. owner_id ) ;
0 commit comments