diff options
| author | Patrick Walton <[email protected]> | 2010-07-19 19:12:02 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-07-19 19:14:41 -0700 |
| commit | b0f77088fa9d4afe98254f9c36e4bf707eef2c01 (patch) | |
| tree | 61ec62bce8602ba3d8951ec5a12ba44a651ca3e2 /src/boot | |
| parent | ctxt_auto_deref_lval decides whether to autoderef the entire lval, not its base. (diff) | |
| download | rust-b0f77088fa9d4afe98254f9c36e4bf707eef2c01.tar.xz rust-b0f77088fa9d4afe98254f9c36e4bf707eef2c01.zip | |
Strip off TY_mutables and TY_constraineds when unboxing values during autoderef
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/me/type.ml | 1 |
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 |