-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update to latest Verus snapshot
- Loading branch information
1 parent
c01c05e
commit 18d55e0
Showing
14 changed files
with
432 additions
and
140 deletions.
There are no files selected for viewing
143 changes: 67 additions & 76 deletions
143
examples/verus-snapshot/source/rust_verify/example/syntax.rs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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 |
---|---|---|
|
@@ -26,4 +26,3 @@ pub proof fn tracked_static_ref<V>(tracked v: V) -> (tracked res: &'static V) | |
} | ||
|
||
} // verus! | ||
// verus |
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
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
64 changes: 64 additions & 0 deletions
64
examples/verus-snapshot/source/vstd/source/vstd/std_specs/clone.rs
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
use crate::prelude::*; | ||
use core::clone::Clone; | ||
|
||
verus! { | ||
|
||
// external_fn_specification doesn't generally support specifying generic functions | ||
// like this; it is special-cased for Clone for now | ||
#[verifier(external_fn_specification)] | ||
pub fn ex_clone_clone<T: Clone>(a: &T) -> T { | ||
a.clone() | ||
} | ||
|
||
/* | ||
#[verifier(external_fn_specification)] | ||
pub fn ex_clone_clone_from<T: Clone>(a: &mut T, b: &T) | ||
{ | ||
a.clone_from(b) | ||
} | ||
*/ | ||
|
||
#[verifier::external_fn_specification] | ||
pub fn ex_bool_clone(b: &bool) -> (res: bool) | ||
ensures | ||
res == b, | ||
{ | ||
b.clone() | ||
} | ||
|
||
#[allow(suspicious_double_ref_op)] | ||
#[verifier::external_fn_specification] | ||
pub fn ex_ref_clone<'b, T: ?Sized, 'a>(b: &'a &'b T) -> (res: &'b T) | ||
ensures | ||
res == b, | ||
{ | ||
b.clone() | ||
} | ||
|
||
/* | ||
#[verifier::external_fn_specification] | ||
pub fn ex_bool_clone_from(dest: &mut bool, source: &bool) | ||
ensures *dest == source, | ||
{ | ||
dest.clone_from(source) | ||
} | ||
*/ | ||
|
||
// Cloning a Tracked copies the underlying ghost T | ||
#[verifier::external_fn_specification] | ||
pub fn ex_tracked_clone<T: Copy>(b: &Tracked<T>) -> (res: Tracked<T>) | ||
ensures | ||
res == b, | ||
{ | ||
b.clone() | ||
} | ||
|
||
#[verifier::external_fn_specification] | ||
pub fn ex_ghost_clone<T>(b: &Ghost<T>) -> (res: Ghost<T>) | ||
ensures | ||
res == b, | ||
{ | ||
b.clone() | ||
} | ||
|
||
} // verus! |
1 change: 1 addition & 0 deletions
1
examples/verus-snapshot/source/vstd/source/vstd/std_specs/mod.rs
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,5 +1,6 @@ | ||
pub mod atomic; | ||
pub mod bits; | ||
pub mod clone; | ||
pub mod control_flow; | ||
pub mod core; | ||
pub mod num; | ||
|
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
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
Oops, something went wrong.