Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurel300 committed Jul 20, 2022
1 parent 9142078 commit 186e97e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prusti-specs/src/specifications/preparser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ mod tests {
);
assert_eq!(
parse_prusti(quote! { exists(|x: i32| a === b) }).unwrap().to_string(),
"exists (() , # [prusti :: spec_only] | x : i32 | -> bool { ((snapshot_equality (a , b)) : bool) })",
"exists (() , # [prusti :: spec_only] | x : i32 | -> bool { ((snapshot_equality (& a , & b)) : bool) })",
);
assert_eq!(
parse_prusti(quote! { forall(|x: i32| a ==> b, triggers = [(c,), (d, e)]) }).unwrap().to_string(),
Expand Down
2 changes: 1 addition & 1 deletion prusti-tests/tests/verify/fail/closures/using-type-dep.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compiler-flags: -Penable_ghost_constraints=true
// compile-flags: -Penable_ghost_constraints=true

#![feature(unboxed_closures, fn_traits)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// ignore-test The function arguments (desugared to a 1-tuple of reference
// here) are probably the issue; then this is similar to #1077 ?

pub fn max_by_key<A, B: Ord>(a: A, b: A, key: impl Fn(&A) -> B) -> A {
if key(&a) > key(&b) { //~ Error: only calls to closures are supported
a
Expand Down
2 changes: 1 addition & 1 deletion prusti-tests/tests/verify/pass/closures/using-type-dep.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compiler-flags: -Penable_ghost_constraints=true
// compile-flags: -Penable_ghost_constraints=true

#![feature(unboxed_closures, fn_traits)]

Expand Down

0 comments on commit 186e97e

Please sign in to comment.