mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Fox the clauses that actually satisfy box and mutable constraints; in all the confusion I had got those wrong.
This commit is contained in:
+10
-14
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user