Skip to content

Commit 505700a

Browse files
committed
Work around issue with is_foreign_item
1 parent d00c437 commit 505700a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kani-compiler/src/kani_middle/reachability.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,10 @@ fn to_fingerprint(tcx: TyCtxt, item: &InternalMonoItem) -> Fingerprint {
485485

486486
/// Return whether we should include the item into codegen.
487487
fn should_codegen_locally(instance: &Instance) -> bool {
488-
!instance.is_foreign_item()
488+
// TODO: This should only check is_foreign_item() or even `has_body()`.
489+
// We need https://github.com/rust-lang/rust/pull/118681 to land first.
490+
//!instance.is_foreign_item()
491+
instance.body().is_some()
489492
}
490493

491494
fn collect_alloc_items(alloc_id: AllocId) -> Vec<MonoItem> {

0 commit comments

Comments
 (0)