aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-07-19 19:12:02 -0700
committerPatrick Walton <[email protected]>2010-07-19 19:14:41 -0700
commitb0f77088fa9d4afe98254f9c36e4bf707eef2c01 (patch)
tree61ec62bce8602ba3d8951ec5a12ba44a651ca3e2 /src/boot/me
parentctxt_auto_deref_lval decides whether to autoderef the entire lval, not its base. (diff)
downloadrust-b0f77088fa9d4afe98254f9c36e4bf707eef2c01.tar.xz
rust-b0f77088fa9d4afe98254f9c36e4bf707eef2c01.zip
Strip off TY_mutables and TY_constraineds when unboxing values during autoderef
Diffstat (limited to 'src/boot/me')
-rw-r--r--src/boot/me/type.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index 13f25778..ddb9608b 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -55,6 +55,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
let rec unbox ty acc =
match ty with
Ast.TY_box ty' -> unbox ty' (acc + 1)
+ | Ast.TY_mutable ty' | Ast.TY_constrained (ty', _) -> unbox ty' acc
| _ -> (ty, acc)
in
unbox ty 0