diff options
author | Son HO | 2024-04-04 14:31:03 +0200 |
---|---|---|
committer | GitHub | 2024-04-04 14:31:03 +0200 |
commit | b4f5719a10427dfc168f1210b05397599e761f9a (patch) | |
tree | 55906070f19df2a3185250df2aef36f47669842a /tests/fstar/misc/NoNestedBorrows.fst | |
parent | 88cb18c614819f4abba1e0dfdb80c455d334d595 (diff) | |
parent | 0c3be2a82205d2737546c7ce8b15b6ad07f34095 (diff) |
Merge pull request #111 from AeneasVerif/son/names
Improve the names used for the variables in the generated code
Diffstat (limited to 'tests/fstar/misc/NoNestedBorrows.fst')
-rw-r--r-- | tests/fstar/misc/NoNestedBorrows.fst | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/fstar/misc/NoNestedBorrows.fst b/tests/fstar/misc/NoNestedBorrows.fst index db63eb0d..1a93beaa 100644 --- a/tests/fstar/misc/NoNestedBorrows.fst +++ b/tests/fstar/misc/NoNestedBorrows.fst @@ -291,8 +291,8 @@ let _ = assert_norm (test_split_list = Return ()) let choose (t : Type0) (b : bool) (x : t) (y : t) : result (t & (t -> result (t & t))) = if b - then let back_'a = fun ret -> Return (ret, y) in Return (x, back_'a) - else let back_'a = fun ret -> Return (x, ret) in Return (y, back_'a) + then let back = fun ret -> Return (ret, y) in Return (x, back) + else let back = fun ret -> Return (x, ret) in Return (y, back) (** [no_nested_borrows::choose_test]: Source: 'src/no_nested_borrows.rs', lines 282:0-282:20 *) @@ -355,15 +355,14 @@ let rec list_nth_mut begin match l with | List_Cons x tl -> if i = 0 - then - let back_'a = fun ret -> Return (List_Cons ret tl) in Return (x, back_'a) + then let back = fun ret -> Return (List_Cons ret tl) in Return (x, back) else let* i1 = u32_sub i 1 in let* (x1, list_nth_mut_back) = list_nth_mut t tl i1 in - let back_'a = + let back = fun ret -> let* tl1 = list_nth_mut_back ret in Return (List_Cons x tl1) in - Return (x1, back_'a) + Return (x1, back) | List_Nil -> Fail Failure end |