-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collect some example code that we produce and Verus dislikes
- Loading branch information
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
verus! { | ||
|
||
// We add a trailing comma that Verus (and Rust) doesn't like | ||
spec fn host_ignoring_unparseable(pre: AbstractHostState, post: AbstractHostState) -> bool { | ||
post == AbstractHostState { received_packet: None, ..pre } | ||
post == AbstractHostState { received_packet: None, another_long_field_name: 12345, yet_another_long_field_name: 12345, ..pre } | ||
} | ||
|
||
// We add a comma after the ensures, which Verus doesn't like | ||
fn is_marshalable() -> (res: bool) | ||
ensures res == self.is_marshalable(); | ||
|
||
fn test() { | ||
// Adds a comma that `reveal` doesn't like | ||
reveal(crate::marshal_ironsht_specific_v::ckeyhashmap_max_serialized_size); | ||
} | ||
|
||
// We add an extra star in front of the const | ||
#[verifier(external)] | ||
pub unsafe fn unflatten_args( | ||
num_args: i32, | ||
arg_lengths: *const i32, | ||
) -> bool | ||
{ | ||
true | ||
} | ||
|
||
|
||
} // verus! |