1
Fork 0

Improve LanguageItems api

This commit is contained in:
Cameron Steffen 2022-10-26 16:17:59 -05:00
parent 5e97720429
commit 99de57ae13
3 changed files with 43 additions and 28 deletions

View file

@ -380,11 +380,9 @@ fn reachable_set<'tcx>(tcx: TyCtxt<'tcx>, (): ()) -> FxHashSet<LocalDefId> {
})
.collect::<Vec<_>>();
for item in tcx.lang_items().items().iter() {
if let Some(def_id) = *item {
if let Some(def_id) = def_id.as_local() {
reachable_context.worklist.push(def_id);
}
for (_, def_id) in tcx.lang_items().iter() {
if let Some(def_id) = def_id.as_local() {
reachable_context.worklist.push(def_id);
}
}
{