summaryrefslogtreecommitdiff
path: root/compiler/InterpreterBorrows.ml
diff options
context:
space:
mode:
authorAymeric Fromherz2024-05-30 13:45:58 +0200
committerAymeric Fromherz2024-05-30 13:45:58 +0200
commitbdabf34385eb8949a4ca3e66be44d0067d57b159 (patch)
tree2cb5d83d2fe1ec772c96f0966f4c036808b57b21 /compiler/InterpreterBorrows.ml
parentad4cbc5d7d3d9f907cd12fc7bff480e61679043d (diff)
destructure_abs can be called during collapse: markers should be allowed
Diffstat (limited to 'compiler/InterpreterBorrows.ml')
-rw-r--r--compiler/InterpreterBorrows.ml4
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/InterpreterBorrows.ml b/compiler/InterpreterBorrows.ml
index e9be07aa..b4e45825 100644
--- a/compiler/InterpreterBorrows.ml
+++ b/compiler/InterpreterBorrows.ml
@@ -1653,7 +1653,6 @@ let destructure_abs (span : Meta.span) (abs_kind : abs_kind) (can_end : bool)
(* Explore the loan content *)
match lc with
| ASharedLoan (pm, bids, sv, child_av) ->
- sanity_check __FILE__ __LINE__ (pm = PNone) span;
(* We don't support nested borrows for now *)
cassert __FILE__ __LINE__
(not (value_has_borrows ctx sv.value))
@@ -1676,7 +1675,6 @@ let destructure_abs (span : Meta.span) (abs_kind : abs_kind) (can_end : bool)
signature) *)
List.iter push avl
| AMutLoan (pm, bid, child_av) ->
- sanity_check __FILE__ __LINE__ (pm = PNone) span;
(* Explore the child *)
list_avalues false push_fail child_av;
(* Explore the whole loan *)
@@ -1709,7 +1707,6 @@ let destructure_abs (span : Meta.span) (abs_kind : abs_kind) (can_end : bool)
(* Explore the borrow content *)
match bc with
| AMutBorrow (pm, bid, child_av) ->
- sanity_check __FILE__ __LINE__ (pm = PNone) span;
(* Explore the child *)
list_avalues false push_fail child_av;
(* Explore the borrow *)
@@ -1717,7 +1714,6 @@ let destructure_abs (span : Meta.span) (abs_kind : abs_kind) (can_end : bool)
let value = ABorrow (AMutBorrow (pm, bid, ignored)) in
push { value; ty }
| ASharedBorrow (pm, _) ->
- sanity_check __FILE__ __LINE__ (pm = PNone) span;
(* Nothing specific to do: keep the value as it is *)
push av
| AIgnoredMutBorrow (opt_bid, child_av) ->