aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-01 18:39:58 -0700
committerGraydon Hoare <[email protected]>2010-07-01 18:39:58 -0700
commitbb018b24f5acac6b1c62b00279a3e7cb894e1d3b (patch)
tree9c77876ce4921616c97e5a5c23024e81aa9ddfc2 /src/boot
parentOf course, the LHS constraint on an init-box statement is mutable @. (diff)
downloadrust-bb018b24f5acac6b1c62b00279a3e7cb894e1d3b.tar.xz
rust-bb018b24f5acac6b1c62b00279a3e7cb894e1d3b.zip
Fox the clauses that actually satisfy box and mutable constraints; in all the confusion I had got those wrong.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/me/type.ml24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index c0251d4a..1529355f 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -417,13 +417,11 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit =
| (TYSPEC_box a', TYSPEC_box b') ->
unify_tyvars ucx a' b'; !a
- | (TYSPEC_box a',
- TYSPEC_resolved (_, Ast.TY_box _)) ->
- unify_tyvars ucx a' b; !b
-
- | (TYSPEC_resolved (_, Ast.TY_box _),
- TYSPEC_box b') ->
- unify_tyvars ucx a b'; !a
+ | (TYSPEC_box tv,
+ TYSPEC_resolved (params, Ast.TY_box ty))
+ | (TYSPEC_resolved (params, Ast.TY_box ty),
+ TYSPEC_box tv) ->
+ unify_ty_parametric ucx ty params tv; !a
| (_, TYSPEC_resolved (params, Ast.TY_box ty))
when ucx.box_ok ->
@@ -446,13 +444,11 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit =
| (TYSPEC_mutable a', TYSPEC_mutable b') ->
unify_tyvars ucx a' b'; !a
- | (TYSPEC_mutable a',
- TYSPEC_resolved (_, Ast.TY_mutable _)) ->
- unify_tyvars ucx a' b; !b
-
- | (TYSPEC_resolved (_, Ast.TY_mutable _),
- TYSPEC_mutable b') ->
- unify_tyvars ucx a b'; !a
+ | (TYSPEC_mutable tv,
+ TYSPEC_resolved (params, Ast.TY_mutable ty))
+ | (TYSPEC_resolved (params, Ast.TY_mutable ty),
+ TYSPEC_mutable tv) ->
+ unify_ty_parametric ucx ty params tv; !a
| (_, TYSPEC_resolved (params, Ast.TY_mutable ty))
when ucx.mut_ok ->