Skip to content

Commit

Permalink
Fix #874
Browse files Browse the repository at this point in the history
  • Loading branch information
xldenis committed Sep 29, 2023
1 parent 7490b0c commit a42326e
Show file tree
Hide file tree
Showing 5 changed files with 1,209 additions and 3 deletions.
8 changes: 5 additions & 3 deletions creusot-contracts/src/std/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ extern_spec! {
}

impl<T, A : Allocator> Extend<T> for Vec<T, A> {
#[ensures(exists<done_ : &mut I, prod: Seq<T>>
done_.completed() && iter.produces(prod, *done_) && (^self)@ == self@.concat(prod)
#[requires(iter.into_iter_pre())]
#[ensures(exists<start_ : I::IntoIter, done_ : &mut I::IntoIter, prod: Seq<T>>
iter.into_iter_post(start_) &&
done_.completed() && start_.produces(prod, *done_) && (^self)@ == self@.concat(prod)
)]
fn extend<I>(&mut self, iter: I)
where
I : Iterator<Item = T>;
I : IntoIterator<Item = T>, I::IntoIter : Iterator;
}

impl<T, I : SliceIndex<[T]>, A : Allocator> IndexMut<I> for Vec<T, A> {
Expand Down
Loading

0 comments on commit a42326e

Please sign in to comment.