We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f719a35 commit 4be20faCopy full SHA for 4be20fa
library/alloc/src/boxed/thin.rs
@@ -447,9 +447,14 @@ impl<T: ?Sized + Error> Error for ThinBox<T> {
447
mod verify {
448
use super::*;
449
450
- // fn drop(&mut self)
451
- #[kani::proof_for_contract(impl<T::drop)]
+ // unsafe fn drop<T: ?Sized>(&self, value: *mut T)
+ #[kani::proof_for_contract(WithHeader<T>::drop)]
452
pub fn check_drop() {
453
- let _ = drop(kani::any());
+ 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
+ }
459
}
460
0 commit comments