Skip to content

Commit

Permalink
Verus doesn't like an ensures clause with a final comma followed by a
Browse files Browse the repository at this point in the history
semi-colon
  • Loading branch information
parno committed Nov 16, 2023
1 parent 4e8b5a4 commit ab6699b
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions examples/wip.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
verus! {

pub fn clone_vec_u8() {
let i = 0;
while i < v.len()
invariant
i <= v.len(),
i == out.len(),
forall|j| #![auto] 0 <= j < i ==> out@[j] == v@[j],
pub trait VerusClone: Sized {
fn clone(&self) -> (o: Self)
ensures
i > 0,
decreases 72,
{
i = i + 1;
}
o == self,
; // this is way too restrictive; it kind of demands Copy. But we don't have a View trait yet. :v(

}

} // verus!

0 comments on commit ab6699b

Please sign in to comment.