Skip to content

Commit

Permalink
Removes a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stogaru committed Dec 11, 2024
1 parent 6fc9d20 commit 33ae4f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 4 additions & 3 deletions library/alloc/src/collections/vec_deque/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3088,12 +3088,13 @@ impl<T, const N: usize> From<[T; N]> for VecDeque<T> {
mod verify {
use core::kani;
use crate::collections::VecDeque;
use core::kani::implies;

#[kani::proof]
// Stubbing is currently not possible for functions returning pointers as
// Arbitrary trait hasn't been implemented for them
// #[kani::stub_verified(<*mut u32>::add)]
fn check_vecdeque_swap() {
// The array's length is set to an arbitrary value, which defines its size.
// In this case, implementing a dynamic array is not possible using any_array
// The more elements in the array the longer the veification time.
const ARRAY_LEN: usize = 40;
let mut arr: [u32; ARRAY_LEN] = kani::Arbitrary::any_array();
let mut deque: VecDeque<u32> = VecDeque::from(arr);
Expand Down
5 changes: 1 addition & 4 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2580,9 +2580,6 @@ mod verify {
use crate::option::Option;

#[kani::proof]
// Stubbing is currently not possible for functions returning pointers as
// Arbitrary trait hasn't been implemented for them
// #[kani::stub_verified(<*const u32>::byte_add)]
fn verify_as_slice() {
if kani::any() {
// Case 1: Option is Some
Expand All @@ -2601,4 +2598,4 @@ mod verify {
assert!(empty_slice.is_empty()); // Explicit check for emptiness
}
}
}
}

0 comments on commit 33ae4f4

Please sign in to comment.