Skip to content

Commit

Permalink
Cherry-pick model-checking#3375 into verify-rust-std (Import apply_cl…
Browse files Browse the repository at this point in the history
…osure into kani_core)

This adds the commit from model-checking#3375 to features/verify-rust-std.
  • Loading branch information
tautschnig committed Jul 24, 2024
1 parent 8d9d1e5 commit 4034b9a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions library/kani_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ macro_rules! kani_intrinsics {
#[doc(hidden)]
#[rustc_diagnostic_item = "KaniInitContracts"]
pub fn init_contracts() {}

/// This should only be used within contracts. The intent is to
/// perform type inference on a closure's argument
#[doc(hidden)]
pub fn apply_closure<T, U: Fn(&T) -> bool>(f: U, x: &T) -> bool {
f(x)
}
}
};
}

0 comments on commit 4034b9a

Please sign in to comment.