@@ -3324,10 +3324,11 @@ pub fn contract_check_ensures<'a, Ret, C: Fn(&'a Ret) -> bool>(ret: &'a Ret, con
3324
3324
#[ rustc_intrinsic]
3325
3325
// VTable pointers must be valid for dereferencing at least 3 `usize` (size, alignment and drop):
3326
3326
// <https://github.com/rust-lang/unsafe-code-guidelines/issues/166>
3327
- #[ requires( ub_checks:: can_dereference( _ptr as * const [ usize ; 3 ] ) ) ]
3328
- pub unsafe fn vtable_size ( _ptr : * const ( ) ) -> usize {
3329
- unreachable ! ( )
3330
- }
3327
+ // TODO: we can no longer do this given https://github.com/model-checking/kani/issues/3325 (this
3328
+ // function used to have a dummy body, but no longer has since
3329
+ // https://github.com/rust-lang/rust/pull/137489 has been merged).
3330
+ // #[requires(ub_checks::can_dereference(_ptr as *const [usize; 3]))]
3331
+ pub unsafe fn vtable_size ( _ptr : * const ( ) ) -> usize ;
3331
3332
3332
3333
/// The intrinsic will return the alignment stored in that vtable.
3333
3334
///
@@ -3339,10 +3340,12 @@ pub unsafe fn vtable_size(_ptr: *const ()) -> usize {
3339
3340
#[ rustc_intrinsic]
3340
3341
// VTable pointers must be valid for dereferencing at least 3 `usize` (size, alignment and drop):
3341
3342
// <https://github.com/rust-lang/unsafe-code-guidelines/issues/166>
3342
- #[ requires( ub_checks:: can_dereference( _ptr as * const [ usize ; 3 ] ) ) ]
3343
- pub unsafe fn vtable_align ( _ptr : * const ( ) ) -> usize {
3344
- unreachable ! ( )
3345
- }
3343
+ // TODO: we can no longer do this given https://github.com/model-checking/kani/issues/3325 (this
3344
+ // function used to have a dummy body, but no longer has since
3345
+ // https://github.com/rust-lang/rust/pull/137489 has been merged).
3346
+ // #[requires(ub_checks::can_dereference(_ptr as *const [usize; 3]))]
3347
+ // #[requires(ub_checks::can_dereference(_ptr as *const [usize; 3]))]
3348
+ pub unsafe fn vtable_align ( _ptr : * const ( ) ) -> usize ;
3346
3349
3347
3350
/// The size of a type in bytes.
3348
3351
///
0 commit comments