We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd9d64c commit 257b96cCopy full SHA for 257b96c
source/rust_verify_test/tests/lifetime.rs
@@ -1009,3 +1009,20 @@ test_verify_one_file! {
1009
}
1010
} => Err(err) => assert_vir_error_msg(err, "used binding `t` isn't initialized")
1011
1012
+
1013
+test_verify_one_file! {
1014
+ #[test] spec_fn_call_fn_arg_proof_code verus_code! {
1015
+ struct R { }
1016
1017
+ pub proof fn consume(tracked r: R) {
1018
+ }
1019
1020
+ pub proof fn y(tracked r: R) {
1021
+ let z = ({
1022
+ consume(r);
1023
+ |y: int| y + 1
1024
+ })(5);
1025
1026
1027
+ } => Err(err) => assert_vir_error_msg(err, "cannot call function `crate::consume` with mode proof")
1028
+}
0 commit comments