From a94b1ccacbc2869b6a67afcda98d7495c0086eb3 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 9 Jan 2012 19:15:17 -0600 Subject: Change all uses of 'when' in alt-patterns to 'if' Issue #1396 --- src/comp/middle/ty.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/comp/middle/ty.rs') diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index f1a1858267a..e0c6d6f4ba2 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -1953,9 +1953,9 @@ mod unify { } ret alt variance { - invariant. when e_proto == a_proto { none } - covariant. when sub_proto(a_proto, e_proto) { none } - contravariant. when sub_proto(e_proto, a_proto) { none } + invariant. if e_proto == a_proto { none } + covariant. if sub_proto(a_proto, e_proto) { none } + contravariant. if sub_proto(e_proto, a_proto) { none } _ { some(ures_err(terr_mismatch)) } }; } @@ -2220,7 +2220,7 @@ mod unify { } ty::ty_param(expected_n, _) { alt struct(cx.tcx, actual) { - ty::ty_param(actual_n, _) when expected_n == actual_n { + ty::ty_param(actual_n, _) if expected_n == actual_n { ret ures_ok(expected); } _ { ret ures_err(terr_mismatch); } -- cgit 1.4.1-3-g733a5