diff --git a/lib/AstToMiniRust.ml b/lib/AstToMiniRust.ml index 1fe40d3c..2eb817ea 100644 --- a/lib/AstToMiniRust.ml +++ b/lib/AstToMiniRust.ml @@ -609,7 +609,7 @@ and translate_expr_with_type (env: env) (e: Ast.expr) (t_ret: MiniRust.typ): env (* PrintMiniRust.ptyp t *) (* PrintMiniRust.ptyp t_ret; *) begin match x, t, t_ret with - | _, (App (Name (["Box"], _), [Slice _]) | MiniRust.Vec _ | Array _), Ref (_, k, Slice _) -> + | _, (MiniRust.App (Name (["Box"], _), [Slice _]) | MiniRust.Vec _ | Array _), Ref (_, k, Slice _) -> Borrow (k, x) | Constant (w, x), Constant UInt32, Constant SizeT -> assert (w = Constant.UInt32);