diff --git a/src/comp/front/test.rs b/src/comp/front/test.rs
index bb2e5426938..79d4523b14b 100644
--- a/src/comp/front/test.rs
+++ b/src/comp/front/test.rs
@@ -100,7 +100,7 @@ fn fold_item(cx: test_ctxt, &&i: @ast::item, fld: fold::ast_fold) ->
 
     if is_test_fn(i) {
         alt i.node {
-          ast::item_fn(decl, _, _) when decl.purity == ast::unsafe_fn {
+          ast::item_fn(decl, _, _) if decl.purity == ast::unsafe_fn {
             cx.sess.span_fatal(
                 i.span,
                 "unsafe functions cannot be used for tests");
diff --git a/src/comp/middle/last_use.rs b/src/comp/middle/last_use.rs
index 075c40ccfa5..5c9e298bcfb 100644
--- a/src/comp/middle/last_use.rs
+++ b/src/comp/middle/last_use.rs
@@ -153,7 +153,7 @@ fn visit_expr(ex: @expr, cx: ctx, v: visit::vt<ctx>) {
         for arg in args {
             alt arg.node {
               expr_fn(proto_block., _, _, _) { fns += [arg]; }
-              expr_fn_block(_, _) when is_block(cx, arg.id) { fns += [arg]; }
+              expr_fn_block(_, _) if is_block(cx, arg.id) { fns += [arg]; }
               _ {
                 alt arg_ts[i].mode {
                   by_mut_ref. { clear_if_path(cx, arg, v, false); }
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 108f2c5b1c5..c884daacf58 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1341,7 +1341,7 @@ fn make_take_glue(cx: @block_ctxt, v: ValueRef, t: ty::t) {
       ty::ty_opaque_closure_ptr(ck) {
         trans_closure::make_opaque_cbox_take_glue(bcx, ck, v)
       }
-      _ when ty::type_is_structural(bcx_tcx(bcx), t) {
+      _ if ty::type_is_structural(bcx_tcx(bcx), t) {
         iter_structural_ty(bcx, v, t, take_ty)
       }
       _ { bcx }
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); }
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index bee3d7783cb..21340168a23 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -182,7 +182,7 @@ fn scan_digits(rdr: reader, radix: uint) -> str {
         let c = rdr.curr();
         if c == '_' { rdr.bump(); cont; }
         alt char::maybe_digit(c) {
-          some(d) when (d as uint) < radix {
+          some(d) if (d as uint) < radix {
             str::push_byte(rslt, c as u8);
             rdr.bump();
           }
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 2eeb5cbf136..b163ae172da 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -753,7 +753,7 @@ fn mk_pexpr(p: parser, lo: uint, hi: uint, node: ast::expr_) -> pexpr {
 
 fn to_expr(e: pexpr) -> @ast::expr {
     alt e.node {
-      ast::expr_tup(es) when vec::len(es) == 1u { es[0u] }
+      ast::expr_tup(es) if vec::len(es) == 1u { es[0u] }
       _ { *e }
     }
 }
@@ -1020,7 +1020,7 @@ fn parse_dot_or_call_expr_with(p: parser, e0: pexpr) -> pexpr {
     while !expr_is_complete(p, e) {
         alt p.peek() {
           // expr(...)
-          token::LPAREN. when permits_call(p) {
+          token::LPAREN. if permits_call(p) {
             let es = parse_seq(token::LPAREN, token::RPAREN,
                                seq_sep(token::COMMA), parse_expr, p);
             hi = es.span.hi;
@@ -1029,7 +1029,7 @@ fn parse_dot_or_call_expr_with(p: parser, e0: pexpr) -> pexpr {
           }
 
           // expr {|| ... }
-          token::LBRACE. when is_bar(p.look_ahead(1u)) && permits_call(p) {
+          token::LBRACE. if is_bar(p.look_ahead(1u)) && permits_call(p) {
             p.bump();
             let blk = parse_fn_block_expr(p);
             alt e.node {
diff --git a/src/test/run-pass/block-arg.rs b/src/test/run-pass/block-arg.rs
index ebbcc65d158..94e1973bbe7 100644
--- a/src/test/run-pass/block-arg.rs
+++ b/src/test/run-pass/block-arg.rs
@@ -29,7 +29,7 @@ fn main() {
         false { }
     }
     alt 3 {
-      _ when vec::any(v) { |e| float::is_negative(e) } {
+      _ if vec::any(v) { |e| float::is_negative(e) } {
       }
       _ {
         fail "wrong answer.";
diff --git a/src/test/run-pass/guards.rs b/src/test/run-pass/guards.rs
index 2da4a0296fd..2dc646ee823 100644
--- a/src/test/run-pass/guards.rs
+++ b/src/test/run-pass/guards.rs
@@ -1,12 +1,12 @@
 fn main() {
     let a =
-        alt 10 { x when x < 7 { 1 } x when x < 11 { 2 } 10 { 3 } _ { 4 } };
+        alt 10 { x if x < 7 { 1 } x if x < 11 { 2 } 10 { 3 } _ { 4 } };
     assert (a == 2);
 
     let b =
         alt {x: 10, y: 20} {
-          x when x.x < 5 && x.y < 5 { 1 }
-          {x: x, y: y} when x == 10 && y == 20 { 2 }
+          x if x.x < 5 && x.y < 5 { 1 }
+          {x: x, y: y} if x == 10 && y == 20 { 2 }
           {x: x, y: y} { 3 }
         };
     assert (b == 2);
diff --git a/src/test/run-pass/unreachable-code.rs b/src/test/run-pass/unreachable-code.rs
index 2ccf2394bed..2570e598b08 100644
--- a/src/test/run-pass/unreachable-code.rs
+++ b/src/test/run-pass/unreachable-code.rs
@@ -31,7 +31,7 @@ fn ret_ret() -> int { ret (ret 2) + 3; }
 
 fn ret_guard() {
     alt 2 {
-      x when (ret) { x; }
+      x if (ret) { x; }
     }
 }
 
diff --git a/src/test/stdtest/math.rs b/src/test/stdtest/math.rs
index c8335718da9..adb68e4198c 100644
--- a/src/test/stdtest/math.rs
+++ b/src/test/stdtest/math.rs
@@ -251,7 +251,7 @@ fn test_sqrt() {
 fn test_angle() {
     fn angle(vec: (float, float)) -> float {
         alt vec {
-          (0f, y) when y < 0f { 1.5 * consts::pi }
+          (0f, y) if y < 0f { 1.5 * consts::pi }
           (0f, y) { 0.5 * consts::pi }
           (x, y) { float::atan(y / x) }
         }