From 29ac9629a3f10db5521223bfc7cd3047cc402826 Mon Sep 17 00:00:00 2001 From: "Celina G. Val" Date: Fri, 8 Dec 2023 10:48:48 -0800 Subject: [PATCH] Update kani-compiler/src/kani_middle/reachability.rs --- kani-compiler/src/kani_middle/reachability.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kani-compiler/src/kani_middle/reachability.rs b/kani-compiler/src/kani_middle/reachability.rs index bab77c5b4347..216feb66fb87 100644 --- a/kani-compiler/src/kani_middle/reachability.rs +++ b/kani-compiler/src/kani_middle/reachability.rs @@ -153,7 +153,7 @@ impl<'tcx> MonoItemsCollector<'tcx> { /// instruction looking for the items that should be included in the compilation. fn reachable_items(&mut self) { while let Some(to_visit) = self.queue.pop() { - if !self.tcx.is_foreign_item(rustc_internal::internal(to_visit.clone()).def_id()) { + if !self.collected.contains(&to_visit) { self.collected.insert(to_visit.clone()); let next_items = match &to_visit { MonoItem::Fn(instance) => self.visit_fn(*instance),