aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-06-30 21:00:57 -0700
committerGraydon Hoare <[email protected]>2010-06-30 21:00:57 -0700
commitd2e7c1a5dc9824a0c849619b4f8691bf726b0bfa (patch)
tree74a78412433b39bc72977a6e79db9a4d002c0af9 /src/boot/me
parentAdd relaxed init-context in which we're willing to auto-deref. (diff)
downloadrust-d2e7c1a5dc9824a0c849619b4f8691bf726b0bfa.tar.xz
rust-d2e7c1a5dc9824a0c849619b4f8691bf726b0bfa.zip
Add two move variants of "acceptable mismatches to recover from" when the mut_ok or ext_ok flags are set.
Diffstat (limited to 'src/boot/me')
-rw-r--r--src/boot/me/type.ml16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index 9b09bf79..f8566d87 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -432,6 +432,14 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit =
TYSPEC_exterior b') ->
unify_tyvars ucx a b'; !a
+ | (_, TYSPEC_resolved (params, Ast.TY_exterior ty))
+ when ucx.ext_ok ->
+ unify_ty_parametric ucx ty params a; !b
+
+ | (TYSPEC_resolved (params, Ast.TY_exterior ty), _)
+ when ucx.ext_ok ->
+ unify_ty_parametric ucx ty params b; !a
+
| (TYSPEC_exterior a', _) when ucx.ext_ok
-> unify_tyvars ucx a' b; !a
| (_, TYSPEC_exterior b') when ucx.ext_ok
@@ -453,6 +461,14 @@ let process_crate (cx:ctxt) (crate:Ast.crate) : unit =
TYSPEC_mutable b') ->
unify_tyvars ucx a b'; !a
+ | (_, TYSPEC_resolved (params, Ast.TY_mutable ty))
+ when ucx.mut_ok ->
+ unify_ty_parametric ucx ty params a; !b
+
+ | (TYSPEC_resolved (params, Ast.TY_mutable ty), _)
+ when ucx.mut_ok ->
+ unify_ty_parametric ucx ty params b; !a
+
| (TYSPEC_mutable a', _) when ucx.mut_ok
-> unify_tyvars ucx a' b; !a
| (_, TYSPEC_mutable b') when ucx.mut_ok