diff options
| author | Graydon Hoare <[email protected]> | 2010-07-01 13:20:57 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-01 13:20:57 -0700 |
| commit | 2122b59ea2c5fa83fb7b3be7365c8e661b18f28e (patch) | |
| tree | 2bba1d336b67ffd7ba28ec923ae018e398f20ac3 /src/boot/me/semant.ml | |
| parent | Add more logging to copy/init paths. (diff) | |
| download | rust-2122b59ea2c5fa83fb7b3be7365c8e661b18f28e.tar.xz rust-2122b59ea2c5fa83fb7b3be7365c8e661b18f28e.zip | |
Some work on teaching trans to differentiate between auto-deref and explicit-deref contexts.
Diffstat (limited to 'src/boot/me/semant.ml')
| -rw-r--r-- | src/boot/me/semant.ml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index 182c6811..21e55193 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -1065,14 +1065,19 @@ let check_concrete params thing = else bug () "unhandled parametric binding" ;; -let rec simplified_ty (t:Ast.ty) : Ast.ty = +let rec strip_mutable_or_constrained_ty (t:Ast.ty) : Ast.ty = match t with - Ast.TY_box t - | Ast.TY_mutable t - | Ast.TY_constrained (t, _) -> simplified_ty t + Ast.TY_mutable t + | Ast.TY_constrained (t, _) -> strip_mutable_or_constrained_ty t | _ -> t ;; +let rec simplified_ty (t:Ast.ty) : Ast.ty = + match strip_mutable_or_constrained_ty t with + Ast.TY_box t -> simplified_ty t + | t -> t +;; + let rec project_type (base_ty:Ast.ty) (comp:Ast.lval_component) |