Skip to content

Commit

Permalink
Change generate_unchecked_neg_harness macro
Browse files Browse the repository at this point in the history
  • Loading branch information
yew005 committed Oct 3, 2024
1 parent 715e940 commit a3bf6d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1620,13 +1620,13 @@ mod verify {
}

macro_rules! generate_unchecked_neg_harness {
($type:ty, $method:ident, $harness_name:ident) => {
#[kani::proof_for_contract($type::$method)]
($type:ty, $harness_name:ident) => {
#[kani::proof_for_contract($type::unchecked_neg)]
pub fn $harness_name() {
let num1: $type = kani::any::<$type>();

unsafe {
num1.$method();
num1.unchecked_neg();
}
}
}
Expand Down

0 comments on commit a3bf6d1

Please sign in to comment.