Skip to content

Commit 4be20fa

Browse files
committed
Fix harness
1 parent f719a35 commit 4be20fa

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

library/alloc/src/boxed/thin.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,14 @@ impl<T: ?Sized + Error> Error for ThinBox<T> {
447447
mod verify {
448448
use super::*;
449449

450-
// fn drop(&mut self)
451-
#[kani::proof_for_contract(impl<T::drop)]
450+
// unsafe fn drop<T: ?Sized>(&self, value: *mut T)
451+
#[kani::proof_for_contract(WithHeader<T>::drop)]
452452
pub fn check_drop() {
453-
let _ = drop(kani::any());
453+
let w = WithHeader::new(kani::any::<usize>(), kani::any::<usize>());
454+
let mut x : usize = kani::any();
455+
let xptr = &mut x;
456+
unsafe {
457+
let _ = w.drop(xptr);
458+
}
454459
}
455460
}

0 commit comments

Comments
 (0)