about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2022-10-26 16:17:59 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2022-10-29 16:04:04 -0500
commit99de57ae135420d52af00df9080c0ffe6786e83c (patch)
tree699f8b8cb4d93cde9ab811d9c4fbf8931b6afaf6 /compiler/rustc_passes/src
parent5e9772042948002f9c6f60c4c81603170035fffa (diff)
downloadrust-99de57ae135420d52af00df9080c0ffe6786e83c.tar.gz
rust-99de57ae135420d52af00df9080c0ffe6786e83c.zip
Improve LanguageItems api
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/reachable.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_passes/src/reachable.rs b/compiler/rustc_passes/src/reachable.rs
index 10d5fc5d671..73ea06a6370 100644
--- a/compiler/rustc_passes/src/reachable.rs
+++ b/compiler/rustc_passes/src/reachable.rs
@@ -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);
         }
     }
     {