Skip to content

Commit

Permalink
Work around issue with is_foreign_item
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval committed Dec 6, 2023
1 parent d00c437 commit 505700a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kani-compiler/src/kani_middle/reachability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ fn to_fingerprint(tcx: TyCtxt, item: &InternalMonoItem) -> Fingerprint {

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

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

0 comments on commit 505700a

Please sign in to comment.