@@ -1224,6 +1224,7 @@ pub(super) fn hir_module_items(tcx: TyCtxt<'_>, module_id: LocalModDefId) -> Mod
12241224 body_owners,
12251225 opaques,
12261226 nested_bodies,
1227+ eiis,
12271228 ..
12281229 } = collector;
12291230 ModuleItems {
@@ -1237,6 +1238,7 @@ pub(super) fn hir_module_items(tcx: TyCtxt<'_>, module_id: LocalModDefId) -> Mod
12371238 opaques : opaques. into_boxed_slice ( ) ,
12381239 nested_bodies : nested_bodies. into_boxed_slice ( ) ,
12391240 delayed_lint_items : Box :: new ( [ ] ) ,
1241+ eiis : eiis. into_boxed_slice ( ) ,
12401242 }
12411243}
12421244
@@ -1259,6 +1261,7 @@ pub(crate) fn hir_crate_items(tcx: TyCtxt<'_>, _: ()) -> ModuleItems {
12591261 opaques,
12601262 nested_bodies,
12611263 mut delayed_lint_items,
1264+ eiis,
12621265 ..
12631266 } = collector;
12641267
@@ -1281,6 +1284,7 @@ pub(crate) fn hir_crate_items(tcx: TyCtxt<'_>, _: ()) -> ModuleItems {
12811284 opaques : opaques. into_boxed_slice ( ) ,
12821285 nested_bodies : nested_bodies. into_boxed_slice ( ) ,
12831286 delayed_lint_items : delayed_lint_items. into_boxed_slice ( ) ,
1287+ eiis : eiis. into_boxed_slice ( ) ,
12841288 }
12851289}
12861290
@@ -1298,6 +1302,7 @@ struct ItemCollector<'tcx> {
12981302 opaques : Vec < LocalDefId > ,
12991303 nested_bodies : Vec < LocalDefId > ,
13001304 delayed_lint_items : Vec < OwnerId > ,
1305+ eiis : Vec < LocalDefId > ,
13011306}
13021307
13031308impl < ' tcx > ItemCollector < ' tcx > {
@@ -1314,6 +1319,7 @@ impl<'tcx> ItemCollector<'tcx> {
13141319 opaques : Vec :: default ( ) ,
13151320 nested_bodies : Vec :: default ( ) ,
13161321 delayed_lint_items : Vec :: default ( ) ,
1322+ eiis : Vec :: default ( ) ,
13171323 }
13181324 }
13191325}
@@ -1335,6 +1341,12 @@ impl<'hir> Visitor<'hir> for ItemCollector<'hir> {
13351341 self . delayed_lint_items . push ( item. item_id ( ) . owner_id ) ;
13361342 }
13371343
1344+ if let ItemKind :: Static ( ..) | ItemKind :: Fn { .. } | ItemKind :: Macro ( ..) = & item. kind
1345+ && item. eii
1346+ {
1347+ self . eiis . push ( item. owner_id . def_id )
1348+ }
1349+
13381350 // Items that are modules are handled here instead of in visit_mod.
13391351 if let ItemKind :: Mod ( _, module) = & item. kind {
13401352 self . submodules . push ( item. owner_id ) ;
0 commit comments