summaryrefslogtreecommitdiff
path: root/src/SymbolicAstUtils.ml
diff options
context:
space:
mode:
authorSon Ho2022-01-24 07:45:46 +0100
committerSon Ho2022-01-24 07:45:46 +0100
commit3f10869014d639199fc18df661c3faf3b90e6462 (patch)
tree304ac5e3b7e9475496a16d5819abf427483f760f /src/SymbolicAstUtils.ml
parent67131cfdb02a70a97a6a4654c2eaed96cf958164 (diff)
Make minor modifications
Diffstat (limited to 'src/SymbolicAstUtils.ml')
-rw-r--r--src/SymbolicAstUtils.ml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SymbolicAstUtils.ml b/src/SymbolicAstUtils.ml
index 7b93b019..f781ed65 100644
--- a/src/SymbolicAstUtils.ml
+++ b/src/SymbolicAstUtils.ml
@@ -55,7 +55,15 @@ let get_top_owned_ended_loans_borrows (abs : V.abs) : ended_loan_or_borrow list
| AEndedMutLoan { child = _; given_back = _; given_back_meta } ->
(* Add the meta-value and stop the exploration *)
add_cloan given_back_meta
- | AEndedSharedLoan (_, _) -> raise Unimplemented
+ | AEndedSharedLoan (_, _) ->
+ (* We don't dive into shared loans: there is nothing to give back
+ * inside (note that there could be a mutable borrow in the shared
+ * value, pointing to a mutable loan in the child avalue, but this
+ * borrow is in practice immutable *)
+ ()
+ | AIgnoredMutLoan (_, _) ->
+ (* There can be *inner* mutable loans, but not outer ones *)
+ failwith "Unreachable"
| AEndedIgnoredMutLoan _ ->
(* Dive in *)
super#visit_aloan_content env lc