Improve LanguageItems api
This commit is contained in:
parent
5e97720429
commit
99de57ae13
3 changed files with 43 additions and 28 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue