From 3f10869014d639199fc18df661c3faf3b90e6462 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Mon, 24 Jan 2022 07:45:46 +0100 Subject: Make minor modifications --- src/SymbolicAstUtils.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/SymbolicAstUtils.ml') 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 -- cgit v1.2.3