about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-06 12:34:08 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-06 15:36:30 -0700
commitecaf9e39c9435fa2de4fe393c4b263be36eb2d99 (patch)
tree775f69be65adff65551d96173dd797e32e2c3157 /src/libstd
parentd3a9bb1bd4a1d510bbaca2ab1121e4c85a239247 (diff)
downloadrust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.tar.gz
rust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.zip
Convert alt to match. Stop parsing alt
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/base64.rs4
-rw-r--r--src/libstd/bitv.rs32
-rw-r--r--src/libstd/c_vec.rs2
-rw-r--r--src/libstd/deque.rs18
-rw-r--r--src/libstd/ebml.rs8
-rw-r--r--src/libstd/fun_treemap.rs6
-rw-r--r--src/libstd/getopts.rs106
-rw-r--r--src/libstd/json.rs56
-rw-r--r--src/libstd/list.rs14
-rw-r--r--src/libstd/map.rs16
-rw-r--r--src/libstd/net_ip.rs16
-rw-r--r--src/libstd/net_tcp.rs66
-rw-r--r--src/libstd/rope.rs72
-rw-r--r--src/libstd/serialization.rs4
-rw-r--r--src/libstd/smallintmap.rs8
-rw-r--r--src/libstd/tempfile.rs2
-rw-r--r--src/libstd/term.rs2
-rw-r--r--src/libstd/test.rs23
-rw-r--r--src/libstd/time.rs74
-rw-r--r--src/libstd/timer.rs4
-rw-r--r--src/libstd/treemap.rs6
-rw-r--r--src/libstd/uv_global_loop.rs2
-rw-r--r--src/libstd/uv_iotask.rs2
-rw-r--r--src/libstd/uv_ll.rs2
24 files changed, 276 insertions, 269 deletions
diff --git a/src/libstd/base64.rs b/src/libstd/base64.rs
index e76d3093c17..a51ac7658a6 100644
--- a/src/libstd/base64.rs
+++ b/src/libstd/base64.rs
@@ -30,7 +30,7 @@ impl of to_base64 for ~[u8] {
             i += 3u;
         }
 
-        alt check len % 3u {
+        match check len % 3u {
           0u => (),
           1u => {
             let n = (self[i] as uint) << 16u;
@@ -96,7 +96,7 @@ impl of from_base64 for ~[u8] {
                 } else if ch == '/' {
                     n |= 0x3Fu;
                 } else if ch == '=' {
-                    alt len - i {
+                    match len - i {
                       1u => {
                         vec::push(r, ((n >> 16u) & 0xFFu) as u8);
                         vec::push(r, ((n >> 8u ) & 0xFFu) as u8);
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs
index de51e2b7f51..4b1fa4bfac9 100644
--- a/src/libstd/bitv.rs
+++ b/src/libstd/bitv.rs
@@ -179,9 +179,9 @@ class bitv {
             if self.nbits != other.nbits {
                 self.die();
             }
-            alt self.rep {
-              small(s) => alt other.rep {
-                small(s1) => alt op {
+            match self.rep {
+              small(s) => match other.rep {
+                small(s1) => match op {
                   union      => s.union(s1),
                   intersect  => s.intersect(s1),
                   assign     => s.become(s1),
@@ -189,9 +189,9 @@ class bitv {
                 }
                 big(s1) => self.die()
               }
-              big(s) => alt other.rep {
+              big(s) => match other.rep {
                 small(_) => self.die(),
-                big(s1) => alt op {
+                big(s1) => match op {
                   union      => s.union(s1),
                   intersect  => s.intersect(s1),
                   assign     => s.become(s1),
@@ -232,7 +232,7 @@ class bitv {
     /// Makes a copy of a bitvector
     #[inline(always)]
     fn clone() -> ~bitv {
-        ~alt self.rep {
+        ~match self.rep {
           small(b) => {
             bitv{nbits: self.nbits, rep: small(~small_bitv{bits: b.bits})}
           }
@@ -249,7 +249,7 @@ class bitv {
     #[inline(always)]
     pure fn get(i: uint) -> bool {
        assert (i < self.nbits);
-       alt self.rep {
+       match self.rep {
          big(b)   => b.get(i),
          small(s) => s.get(i)
        }
@@ -263,7 +263,7 @@ class bitv {
     #[inline(always)]
     fn set(i: uint, x: bool) {
       assert (i < self.nbits);
-      alt self.rep {
+      match self.rep {
         big(b)   => b.set(i, x),
         small(s) => s.set(i, x)
       }
@@ -278,12 +278,12 @@ class bitv {
     #[inline(always)]
     fn equal(v1: bitv) -> bool {
       if self.nbits != v1.nbits { return false; }
-      alt self.rep {
-        small(b) => alt v1.rep {
+      match self.rep {
+        small(b) => match v1.rep {
           small(b1) => b.equals(b1),
           _ => false
         }
-        big(s) => alt v1.rep {
+        big(s) => match v1.rep {
           big(s1) => s.equals(s1),
           small(_) => return false
         }
@@ -293,7 +293,7 @@ class bitv {
     /// Set all bits to 0
     #[inline(always)]
     fn clear() {
-        alt self.rep {
+        match self.rep {
           small(b) => b.clear(),
           big(s) => for s.each_storage() |w| { w = 0u }
         }
@@ -302,7 +302,7 @@ class bitv {
     /// Set all bits to 1
     #[inline(always)]
     fn set_all() {
-      alt self.rep {
+      match self.rep {
         small(b) => b.set_all(),
         big(s) => for s.each_storage() |w| { w = !0u } }
     }
@@ -310,7 +310,7 @@ class bitv {
     /// Invert all bits
     #[inline(always)]
     fn invert() {
-      alt self.rep {
+      match self.rep {
         small(b) => b.invert(),
         big(s) => for s.each_storage() |w| { w = !w } }
     }
@@ -329,7 +329,7 @@ class bitv {
         /// Returns true if all bits are 1
     #[inline(always)]
     fn is_true() -> bool {
-      alt self.rep {
+      match self.rep {
         small(b) => b.is_true(),
         _ => {
           for self.each() |i| { if !i { return false; } }
@@ -350,7 +350,7 @@ class bitv {
     /// Returns true if all bits are 0
 
     fn is_false() -> bool {
-      alt self.rep {
+      match self.rep {
         small(b) => b.is_false(),
         big(_) => {
           for self.each() |i| { if i { return false; } }
diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs
index e00ee13949b..8b5a5e55113 100644
--- a/src/libstd/c_vec.rs
+++ b/src/libstd/c_vec.rs
@@ -46,7 +46,7 @@ class dtor_res {
   let dtor: option<fn@()>;
   new(dtor: option<fn@()>) { self.dtor = dtor; }
   drop {
-    alt self.dtor {
+    match self.dtor {
       option::none => (),
       option::some(f) => f()
     }
diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs
index 5e98f3c7054..8293e4f215c 100644
--- a/src/libstd/deque.rs
+++ b/src/libstd/deque.rs
@@ -41,7 +41,7 @@ fn create<T: copy>() -> t<T> {
         return rv;
     }
     fn get<T: copy>(elts: dvec<cell<T>>, i: uint) -> T {
-        alt elts.get_elt(i) { some(t) => t, _ => fail }
+        match elts.get_elt(i) { some(t) => t, _ => fail }
     }
 
     type repr<T> = {mut nelts: uint,
@@ -238,32 +238,32 @@ mod tests {
         fn inteq(&&a: int, &&b: int) -> bool { return a == b; }
         fn intboxeq(&&a: @int, &&b: @int) -> bool { return a == b; }
         fn taggyeq(a: taggy, b: taggy) -> bool {
-            alt a {
-              one(a1) => alt b {
+            match a {
+              one(a1) => match b {
                 one(b1) => return a1 == b1,
                 _ => return false
               }
-              two(a1, a2) => alt b {
+              two(a1, a2) => match b {
                 two(b1, b2) => return a1 == b1 && a2 == b2,
                 _ => return false
               }
-              three(a1, a2, a3) => alt b {
+              three(a1, a2, a3) => match b {
                 three(b1, b2, b3) => return a1 == b1 && a2 == b2 && a3 == b3,
                 _ => return false
               }
             }
         }
         fn taggypareq<T>(a: taggypar<T>, b: taggypar<T>) -> bool {
-            alt a {
-              onepar::<T>(a1) => alt b {
+            match a {
+              onepar::<T>(a1) => match b {
                 onepar::<T>(b1) => return a1 == b1,
                 _ => return false
               }
-              twopar::<T>(a1, a2) => alt b {
+              twopar::<T>(a1, a2) => match b {
                 twopar::<T>(b1, b2) => return a1 == b1 && a2 == b2,
                 _ => return false
               }
-              threepar::<T>(a1, a2, a3) => alt b {
+              threepar::<T>(a1, a2, a3) => match b {
                 threepar::<T>(b1, b2, b3) => {
                     return a1 == b1 && a2 == b2 && a3 == b3
                 }
diff --git a/src/libstd/ebml.rs b/src/libstd/ebml.rs
index 78ec45659cc..f5396395b93 100644
--- a/src/libstd/ebml.rs
+++ b/src/libstd/ebml.rs
@@ -113,7 +113,7 @@ fn maybe_get_doc(d: doc, tg: uint) -> option<doc> {
 }
 
 fn get_doc(d: doc, tg: uint) -> doc {
-    alt maybe_get_doc(d, tg) {
+    match maybe_get_doc(d, tg) {
       some(d) => return d,
       none => {
         error!{"failed to find block with tag %u", tg};
@@ -189,7 +189,7 @@ enum writer {
 }
 
 fn write_sized_vuint(w: io::writer, n: uint, size: uint) {
-    alt size {
+    match size {
       1u => w.write(&[0x80u8 | (n as u8)]),
       2u => w.write(&[0x40u8 | ((n >> 8_u) as u8), n as u8]),
       3u => w.write(&[0x20u8 | ((n >> 16_u) as u8), (n >> 8_u) as u8,
@@ -593,7 +593,7 @@ fn test_option_int() {
 
     fn serialize_0<S: serialization::serializer>(s: S, v: option<int>) {
         do s.emit_enum(~"core::option::t") {
-            alt v {
+            match v {
               none => s.emit_enum_variant(
                   ~"core::option::none", 0u, 0u, || { } ),
               some(v0) => {
@@ -612,7 +612,7 @@ fn test_option_int() {
     fn deserialize_0<S: serialization::deserializer>(s: S) -> option<int> {
         do s.read_enum(~"core::option::t") {
             do s.read_enum_variant |i| {
-                alt check i {
+                match check i {
                   0u => none,
                   1u => {
                     let v0 = do s.read_enum_variant_arg(0u) {
diff --git a/src/libstd/fun_treemap.rs b/src/libstd/fun_treemap.rs
index e849d77ded6..786af20940e 100644
--- a/src/libstd/fun_treemap.rs
+++ b/src/libstd/fun_treemap.rs
@@ -30,7 +30,7 @@ fn init<K, V>() -> treemap<K, V> { @empty }
 
 /// Insert a value into the map
 fn insert<K: copy, V: copy>(m: treemap<K, V>, k: K, v: V) -> treemap<K, V> {
-    @alt m {
+    @match m {
        @empty => node(@k, @v, @empty, @empty),
        @node(@kk, vv, left, right) => {
          if k < kk {
@@ -44,7 +44,7 @@ fn insert<K: copy, V: copy>(m: treemap<K, V>, k: K, v: V) -> treemap<K, V> {
 
 /// Find a value based on the key
 fn find<K, V: copy>(m: treemap<K, V>, k: K) -> option<V> {
-    alt *m {
+    match *m {
       empty => none,
       node(@kk, @v, left, right) => {
         if k == kk {
@@ -56,7 +56,7 @@ fn find<K, V: copy>(m: treemap<K, V>, k: K) -> option<V> {
 
 /// Visit all pairs in the map in order.
 fn traverse<K, V: copy>(m: treemap<K, V>, f: fn(K, V)) {
-    alt *m {
+    match *m {
       empty => (),
       /*
         Previously, this had what looked like redundant
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index c05c685daa8..04a04691077 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -43,7 +43,7 @@
  *             optflag("h"),
  *             optflag("help")
  *         ];
- *         let matches = alt getopts(vec::tail(args), opts) {
+ *         let matches = match getopts(vec::tail(args), opts) {
  *             result::ok(m) { m }
  *             result::err(f) { fail fail_str(f) }
  *         };
@@ -140,7 +140,7 @@ fn is_arg(arg: ~str) -> bool {
 }
 
 fn name_str(nm: name) -> ~str {
-    return alt nm {
+    return match nm {
       short(ch) => str::from_char(ch),
       long(s) => s
     };
@@ -164,7 +164,7 @@ enum fail_ {
 
 /// Convert a `fail_` enum into an error string
 fn fail_str(f: fail_) -> ~str {
-    return alt f {
+    return match f {
       argument_missing(nm) => ~"Argument to option '" + nm + ~"' missing.",
       unrecognized_option(nm) => ~"Unrecognized option: '" + nm + ~"'.",
       option_missing(nm) => ~"Required option '" + nm + ~"' missing.",
@@ -233,12 +233,14 @@ fn getopts(args: ~[~str], opts: ~[opt]) -> result unsafe {
                        correctly
                     */
 
-                    alt find_opt(opts, opt) {
+                    match find_opt(opts, opt) {
                       some(id) => last_valid_opt_id = option::some(id),
                       none => {
                         let arg_follows =
                             option::is_some(last_valid_opt_id) &&
-                            alt opts[option::get(last_valid_opt_id)].hasarg {
+                            match opts[option::get(last_valid_opt_id)]
+                              .hasarg {
+
                               yes | maybe => true,
                               no => false
                             };
@@ -257,11 +259,11 @@ fn getopts(args: ~[~str], opts: ~[opt]) -> result unsafe {
             let mut name_pos = 0u;
             for vec::each(names) |nm| {
                 name_pos += 1u;
-                let optid = alt find_opt(opts, nm) {
+                let optid = match find_opt(opts, nm) {
                   some(id) => id,
                   none => return err(unrecognized_option(name_str(nm)))
                 };
-                alt opts[optid].hasarg {
+                match opts[optid].hasarg {
                   no => {
                     if !option::is_none::<~str>(i_arg) {
                         return err(unexpected_argument(name_str(nm)));
@@ -309,7 +311,7 @@ fn getopts(args: ~[~str], opts: ~[opt]) -> result unsafe {
 }
 
 fn opt_vals(m: matches, nm: ~str) -> ~[optval] {
-    return alt find_opt(m.opts, mkname(nm)) {
+    return match find_opt(m.opts, mkname(nm)) {
       some(id) => m.vals[id],
       none => {
         error!{"No option '%s' defined", nm};
@@ -328,7 +330,7 @@ fn opt_present(m: matches, nm: ~str) -> bool {
 /// Returns true if any of several options were matched
 fn opts_present(m: matches, names: ~[~str]) -> bool {
     for vec::each(names) |nm| {
-        alt find_opt(m.opts, mkname(nm)) {
+        match find_opt(m.opts, mkname(nm)) {
           some(_) => return true,
           _ => ()
         }
@@ -344,7 +346,7 @@ fn opts_present(m: matches, names: ~[~str]) -> bool {
  * argument
  */
 fn opt_str(m: matches, nm: ~str) -> ~str {
-    return alt opt_val(m, nm) { val(s) => s, _ => fail };
+    return match opt_val(m, nm) { val(s) => s, _ => fail };
 }
 
 /**
@@ -355,7 +357,7 @@ fn opt_str(m: matches, nm: ~str) -> ~str {
  */
 fn opts_str(m: matches, names: ~[~str]) -> ~str {
     for vec::each(names) |nm| {
-        alt opt_val(m, nm) {
+        match opt_val(m, nm) {
           val(s) => return s,
           _ => ()
         }
@@ -373,7 +375,7 @@ fn opts_str(m: matches, names: ~[~str]) -> ~str {
 fn opt_strs(m: matches, nm: ~str) -> ~[~str] {
     let mut acc: ~[~str] = ~[];
     for vec::each(opt_vals(m, nm)) |v| {
-        alt v { val(s) => vec::push(acc, s), _ => () }
+        match v { val(s) => vec::push(acc, s), _ => () }
     }
     return acc;
 }
@@ -382,7 +384,7 @@ fn opt_strs(m: matches, nm: ~str) -> ~[~str] {
 fn opt_maybe_str(m: matches, nm: ~str) -> option<~str> {
     let vals = opt_vals(m, nm);
     if vec::len::<optval>(vals) == 0u { return none::<~str>; }
-    return alt vals[0] { val(s) => some::<~str>(s), _ => none::<~str> };
+    return match vals[0] { val(s) => some::<~str>(s), _ => none::<~str> };
 }
 
 
@@ -396,7 +398,7 @@ fn opt_maybe_str(m: matches, nm: ~str) -> option<~str> {
 fn opt_default(m: matches, nm: ~str, def: ~str) -> option<~str> {
     let vals = opt_vals(m, nm);
     if vec::len::<optval>(vals) == 0u { return none::<~str>; }
-    return alt vals[0] { val(s) => some::<~str>(s), _ => some::<~str>(def) }
+    return match vals[0] { val(s) => some::<~str>(s), _ => some::<~str>(def) }
 }
 
 #[cfg(test)]
@@ -413,7 +415,7 @@ mod tests {
     }
 
     fn check_fail_type(f: fail_, ft: fail_type) {
-        alt f {
+        match f {
           argument_missing(_) => assert ft == argument_missing_,
           unrecognized_option(_) => assert ft == unrecognized_option_,
           option_missing(_) => assert ft == option_missing_,
@@ -429,7 +431,7 @@ mod tests {
         let args = ~[~"--test=20"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
-        alt check rs {
+        match check rs {
           ok(m) => {
             assert (opt_present(m, ~"test"));
             assert (opt_str(m, ~"test") == ~"20");
@@ -442,7 +444,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_missing_),
           _ => fail
         }
@@ -453,7 +455,7 @@ mod tests {
         let args = ~[~"--test"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, argument_missing_),
           _ => fail
         }
@@ -464,7 +466,7 @@ mod tests {
         let args = ~[~"--test=20", ~"--test=30"];
         let opts = ~[reqopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_duplicated_),
           _ => fail
         }
@@ -475,7 +477,7 @@ mod tests {
         let args = ~[~"-t", ~"20"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"t"));
             assert (opt_str(m, ~"t") == ~"20");
@@ -489,7 +491,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_missing_),
           _ => fail
         }
@@ -500,7 +502,7 @@ mod tests {
         let args = ~[~"-t"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, argument_missing_),
           _ => fail
         }
@@ -511,7 +513,7 @@ mod tests {
         let args = ~[~"-t", ~"20", ~"-t", ~"30"];
         let opts = ~[reqopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_duplicated_),
           _ => fail
         }
@@ -524,7 +526,7 @@ mod tests {
         let args = ~[~"--test=20"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"test"));
             assert (opt_str(m, ~"test") == ~"20");
@@ -538,7 +540,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (!opt_present(m, ~"test")),
           _ => fail
         }
@@ -549,7 +551,7 @@ mod tests {
         let args = ~[~"--test"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, argument_missing_),
           _ => fail
         }
@@ -560,7 +562,7 @@ mod tests {
         let args = ~[~"--test=20", ~"--test=30"];
         let opts = ~[optopt(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_duplicated_),
           _ => fail
         }
@@ -571,7 +573,7 @@ mod tests {
         let args = ~[~"-t", ~"20"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"t"));
             assert (opt_str(m, ~"t") == ~"20");
@@ -585,7 +587,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (!opt_present(m, ~"t")),
           _ => fail
         }
@@ -596,7 +598,7 @@ mod tests {
         let args = ~[~"-t"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, argument_missing_),
           _ => fail
         }
@@ -607,7 +609,7 @@ mod tests {
         let args = ~[~"-t", ~"20", ~"-t", ~"30"];
         let opts = ~[optopt(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_duplicated_),
           _ => fail
         }
@@ -620,7 +622,7 @@ mod tests {
         let args = ~[~"--test"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (opt_present(m, ~"test")),
           _ => fail
         }
@@ -631,7 +633,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (!opt_present(m, ~"test")),
           _ => fail
         }
@@ -642,7 +644,7 @@ mod tests {
         let args = ~[~"--test=20"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => {
             log(error, fail_str(f));
             check_fail_type(f, unexpected_argument_);
@@ -656,7 +658,7 @@ mod tests {
         let args = ~[~"--test", ~"--test"];
         let opts = ~[optflag(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_duplicated_),
           _ => fail
         }
@@ -667,7 +669,7 @@ mod tests {
         let args = ~[~"-t"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (opt_present(m, ~"t")),
           _ => fail
         }
@@ -678,7 +680,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (!opt_present(m, ~"t")),
           _ => fail
         }
@@ -689,7 +691,7 @@ mod tests {
         let args = ~[~"-t", ~"20"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             // The next variable after the flag is just a free argument
 
@@ -704,7 +706,7 @@ mod tests {
         let args = ~[~"-t", ~"-t"];
         let opts = ~[optflag(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, option_duplicated_),
           _ => fail
         }
@@ -717,7 +719,7 @@ mod tests {
         let args = ~[~"--test=20"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"test"));
             assert (opt_str(m, ~"test") == ~"20");
@@ -731,7 +733,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (!opt_present(m, ~"test")),
           _ => fail
         }
@@ -742,7 +744,7 @@ mod tests {
         let args = ~[~"--test"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, argument_missing_),
           _ => fail
         }
@@ -753,7 +755,7 @@ mod tests {
         let args = ~[~"--test=20", ~"--test=30"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"test"));
             assert (opt_str(m, ~"test") == ~"20");
@@ -769,7 +771,7 @@ mod tests {
         let args = ~[~"-t", ~"20"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"t"));
             assert (opt_str(m, ~"t") == ~"20");
@@ -783,7 +785,7 @@ mod tests {
         let args = ~[~"blah"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => assert (!opt_present(m, ~"t")),
           _ => fail
         }
@@ -794,7 +796,7 @@ mod tests {
         let args = ~[~"-t"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, argument_missing_),
           _ => fail
         }
@@ -805,7 +807,7 @@ mod tests {
         let args = ~[~"-t", ~"20", ~"-t", ~"30"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (opt_present(m, ~"t"));
             assert (opt_str(m, ~"t") == ~"20");
@@ -821,7 +823,7 @@ mod tests {
         let args = ~[~"--untest"];
         let opts = ~[optmulti(~"t")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, unrecognized_option_),
           _ => fail
         }
@@ -832,7 +834,7 @@ mod tests {
         let args = ~[~"-t"];
         let opts = ~[optmulti(~"test")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           err(f) => check_fail_type(f, unrecognized_option_),
           _ => fail
         }
@@ -849,7 +851,7 @@ mod tests {
              optflag(~"f"), optmulti(~"m"), optmulti(~"n"),
              optopt(~"notpresent")];
         let rs = getopts(args, opts);
-        alt rs {
+        match rs {
           ok(m) => {
             assert (m.free[0] == ~"prog");
             assert (m.free[1] == ~"free1");
@@ -872,7 +874,7 @@ mod tests {
     fn test_multi() {
         let args = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"];
         let opts = ~[optopt(~"e"), optopt(~"encrypt")];
-        let matches = alt getopts(args, opts) {
+        let matches = match getopts(args, opts) {
           result::ok(m) => m,
           result::err(f) => fail
         };
@@ -893,7 +895,7 @@ mod tests {
     fn test_nospace() {
         let args = ~[~"-Lfoo"];
         let opts = ~[optmulti(~"L")];
-        let matches = alt getopts(args, opts) {
+        let matches = match getopts(args, opts) {
           result::ok(m) => m,
           result::err(f) => fail
         };
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index 82a0f7d8084..f3ca79be02b 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -45,7 +45,7 @@ type error = {
 
 /// Serializes a json value into a io::writer
 fn to_writer(wr: io::writer, j: json) {
-    alt j {
+    match j {
       num(n) => wr.write_str(float::to_str(n, 6u)),
       string(s) => wr.write_str(escape_str(*s)),
       boolean(b) => wr.write_str(if b { ~"true" } else { ~"false" }),
@@ -87,7 +87,7 @@ fn to_writer(wr: io::writer, j: json) {
 fn escape_str(s: ~str) -> ~str {
     let mut escaped = ~"\"";
     do str::chars_iter(s) |c| {
-        alt c {
+        match c {
           '"' => escaped += ~"\\\"",
           '\\' => escaped += ~"\\\\",
           '\x08' => escaped += ~"\\b",
@@ -144,7 +144,7 @@ impl parser for parser {
     }
 
     fn parse() -> result<json, error> {
-        alt self.parse_value() {
+        match self.parse_value() {
           ok(value) => {
             // Skip trailing whitespaces.
             self.parse_whitespace();
@@ -164,12 +164,12 @@ impl parser for parser {
 
         if self.eof() { return self.error(~"EOF while parsing value"); }
 
-        alt self.ch {
+        match self.ch {
           'n' => self.parse_ident(~"ull", null),
           't' => self.parse_ident(~"rue", boolean(true)),
           'f' => self.parse_ident(~"alse", boolean(false)),
           '0' to '9' | '-' => self.parse_number(),
-          '"' => alt self.parse_str() {
+          '"' => match self.parse_str() {
             ok(s) => ok(string(s)),
             err(e) => err(e)
           }
@@ -200,20 +200,20 @@ impl parser for parser {
             neg = -1f;
         }
 
-        let mut res = alt self.parse_integer() {
+        let mut res = match self.parse_integer() {
           ok(res) => res,
           err(e) => return err(e)
         };
 
         if self.ch == '.' {
-            alt self.parse_decimal(res) {
+            match self.parse_decimal(res) {
               ok(r) => res = r,
               err(e) => return err(e)
             }
         }
 
         if self.ch == 'e' || self.ch == 'E' {
-            alt self.parse_exponent(res) {
+            match self.parse_exponent(res) {
               ok(r) => res = r,
               err(e) => return err(e)
             }
@@ -225,19 +225,19 @@ impl parser for parser {
     fn parse_integer() -> result<float, error> {
         let mut res = 0f;
 
-        alt self.ch {
+        match self.ch {
           '0' => {
             self.bump();
 
             // There can be only one leading '0'.
-            alt self.ch {
+            match self.ch {
               '0' to '9' => return self.error(~"invalid number"),
               _ => ()
             }
           }
           '1' to '9' => {
             while !self.eof() {
-                alt self.ch {
+                match self.ch {
                   '0' to '9' => {
                     res *= 10f;
                     res += ((self.ch as int) - ('0' as int)) as float;
@@ -258,7 +258,7 @@ impl parser for parser {
         self.bump();
 
         // Make sure a digit follows the decimal place.
-        alt self.ch {
+        match self.ch {
           '0' to '9' => (),
           _ => return self.error(~"invalid number")
         }
@@ -266,7 +266,7 @@ impl parser for parser {
         let mut res = res;
         let mut dec = 1f;
         while !self.eof() {
-            alt self.ch {
+            match self.ch {
               '0' to '9' => {
                 dec /= 10f;
                 res += (((self.ch as int) - ('0' as int)) as float) * dec;
@@ -287,20 +287,20 @@ impl parser for parser {
         let mut exp = 0u;
         let mut neg_exp = false;
 
-        alt self.ch {
+        match self.ch {
           '+' => self.bump(),
           '-' => { self.bump(); neg_exp = true; }
           _ => ()
         }
 
         // Make sure a digit follows the exponent place.
-        alt self.ch {
+        match self.ch {
           '0' to '9' => (),
           _ => return self.error(~"invalid number")
         }
 
         while !self.eof() {
-            alt self.ch {
+            match self.ch {
               '0' to '9' => {
                 exp *= 10u;
                 exp += (self.ch as uint) - ('0' as uint);
@@ -329,7 +329,7 @@ impl parser for parser {
             self.bump();
 
             if (escape) {
-                alt self.ch {
+                match self.ch {
                   '"' => str::push_char(res, '"'),
                   '\\' => str::push_char(res, '\\'),
                   '/' => str::push_char(res, '/'),
@@ -343,7 +343,7 @@ impl parser for parser {
                       let mut i = 0u;
                       let mut n = 0u;
                       while i < 4u {
-                          alt self.next_char() {
+                          match self.next_char() {
                             '0' to '9' => {
                               n = n * 10u +
                                   (self.ch as uint) - ('0' as uint);
@@ -389,7 +389,7 @@ impl parser for parser {
         }
 
         loop {
-            alt self.parse_value() {
+            match self.parse_value() {
               ok(v) => vec::push(values, v),
               e => return e
             }
@@ -399,7 +399,7 @@ impl parser for parser {
                 return self.error(~"EOF while parsing list");
             }
 
-            alt self.ch {
+            match self.ch {
               ',' => self.bump(),
               ']' => { self.bump(); return ok(list(@values)); }
               _ => return self.error(~"expected `,` or `]`")
@@ -425,7 +425,7 @@ impl parser for parser {
                 return self.error(~"key must be a string");
             }
 
-            let key = alt self.parse_str() {
+            let key = match self.parse_str() {
               ok(key) => key,
               err(e) => return err(e)
             };
@@ -438,13 +438,13 @@ impl parser for parser {
             }
             self.bump();
 
-            alt self.parse_value() {
+            match self.parse_value() {
               ok(value) => { values.insert(copy *key, value); }
               e => return e
             }
             self.parse_whitespace();
 
-            alt self.ch {
+            match self.ch {
               ',' => self.bump(),
               '}' => { self.bump(); return ok(dict(values)); }
               _ => {
@@ -477,7 +477,7 @@ fn from_str(s: ~str) -> result<json, error> {
 
 /// Test if two json values are equal
 fn eq(value0: json, value1: json) -> bool {
-    alt (value0, value1) {
+    match (value0, value1) {
       (num(f0), num(f1)) => f0 == f1,
       (string(s0), string(s1)) => s0 == s1,
       (boolean(b0), boolean(b1)) => b0 == b1,
@@ -486,7 +486,7 @@ fn eq(value0: json, value1: json) -> bool {
           if d0.size() == d1.size() {
               let mut equal = true;
               for d0.each |k, v0| {
-                  alt d1.find(k) {
+                  match d1.find(k) {
                     some(v1) => if !eq(v0, v1) { equal = false },
                     none => equal = false
                   }
@@ -581,7 +581,7 @@ impl of to_json for @~str {
 
 impl <A: to_json, B: to_json> of to_json for (A, B) {
     fn to_json() -> json {
-        alt self {
+        match self {
           (a, b) => {
             list(@~[a.to_json(), b.to_json()])
           }
@@ -592,7 +592,7 @@ impl <A: to_json, B: to_json> of to_json for (A, B) {
 impl <A: to_json, B: to_json, C: to_json>
   of to_json for (A, B, C) {
     fn to_json() -> json {
-        alt self {
+        match self {
           (a, b, c) => {
             list(@~[a.to_json(), b.to_json(), c.to_json()])
           }
@@ -616,7 +616,7 @@ impl <A: to_json copy> of to_json for hashmap<~str, A> {
 
 impl <A: to_json> of to_json for option<A> {
     fn to_json() -> json {
-        alt self {
+        match self {
           none => null,
           some(value) => value.to_json()
         }
diff --git a/src/libstd/list.rs b/src/libstd/list.rs
index 3538929e728..4b8b75d3d66 100644
--- a/src/libstd/list.rs
+++ b/src/libstd/list.rs
@@ -43,7 +43,7 @@ fn foldl<T: copy, U>(z: T, ls: @list<U>, f: fn(T, U) -> T) -> T {
 fn find<T: copy>(ls: @list<T>, f: fn(T) -> bool) -> option<T> {
     let mut ls = ls;
     loop {
-        ls = alt *ls {
+        ls = match *ls {
           cons(hd, tl) => {
             if f(hd) { return some(hd); }
             tl
@@ -63,7 +63,7 @@ fn has<T: copy>(ls: @list<T>, elt: T) -> bool {
 
 /// Returns true if the list is empty
 pure fn is_empty<T: copy>(ls: @list<T>) -> bool {
-    alt *ls {
+    match *ls {
         nil => true,
         _ => false
     }
@@ -83,7 +83,7 @@ fn len<T>(ls: @list<T>) -> uint {
 
 /// Returns all but the first element of a list
 pure fn tail<T: copy>(ls: @list<T>) -> @list<T> {
-    alt *ls {
+    match *ls {
         cons(_, tl) => return tl,
         nil => fail ~"list empty"
     }
@@ -91,12 +91,12 @@ pure fn tail<T: copy>(ls: @list<T>) -> @list<T> {
 
 /// Returns the first element of a list
 pure fn head<T: copy>(ls: @list<T>) -> T {
-    alt check *ls { cons(hd, _) => hd }
+    match check *ls { cons(hd, _) => hd }
 }
 
 /// Appends one list to another
 pure fn append<T: copy>(l: @list<T>, m: @list<T>) -> @list<T> {
-    alt *l {
+    match *l {
       nil => return m,
       cons(x, xs) => {
         let rest = append(xs, m);
@@ -114,7 +114,7 @@ fn push<T: copy>(&l: list<T>, v: T) {
 fn iter<T>(l: @list<T>, f: fn(T)) {
     let mut cur = l;
     loop {
-        cur = alt *cur {
+        cur = match *cur {
           cons(hd, tl) => {
             f(hd);
             tl
@@ -128,7 +128,7 @@ fn iter<T>(l: @list<T>, f: fn(T)) {
 fn each<T>(l: @list<T>, f: fn(T) -> bool) {
     let mut cur = l;
     loop {
-        cur = alt *cur {
+        cur = match *cur {
           cons(hd, tl) => {
             if !f(hd) { return; }
             tl
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index 2b99c4cb8aa..695f40fc387 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -133,7 +133,7 @@ mod chained {
             let mut e0 = e_root;
             let mut comp = 1u;   // for logging
             loop {
-                alt copy e0.next {
+                match copy e0.next {
                   none => {
                     debug!{"search_tbl: absent, comp %u, hash %u, idx %u",
                            comp, h, idx};
@@ -156,7 +156,7 @@ mod chained {
 
         fn search_tbl(k: &K, h: uint) -> search_result<K,V> {
             let idx = h % vec::len(self.chains);
-            alt copy self.chains[idx] {
+            match copy self.chains[idx] {
               none => {
                 debug!{"search_tbl: none, comp %u, hash %u, idx %u",
                        0u, h, idx};
@@ -193,7 +193,7 @@ mod chained {
             while i < n {
                 let mut chain = self.chains[i];
                 loop {
-                    chain = alt chain {
+                    chain = match chain {
                       none => break,
                       some(entry) => {
                         let next = entry.next;
@@ -216,7 +216,7 @@ mod chained {
 
         fn contains_key_ref(k: &K) -> bool {
             let hash = self.hasher(k);
-            alt self.search_tbl(k, hash) {
+            match self.search_tbl(k, hash) {
               not_found => false,
               found_first(*) | found_after(*) => true
             }
@@ -224,7 +224,7 @@ mod chained {
 
         fn insert(+k: K, +v: V) -> bool {
             let hash = self.hasher(&k);
-            alt self.search_tbl(&k, hash) {
+            match self.search_tbl(&k, hash) {
               not_found => {
                 self.count += 1u;
                 let idx = hash % vec::len(self.chains);
@@ -265,7 +265,7 @@ mod chained {
         }
 
         fn find(+k: K) -> option<V> {
-            alt self.search_tbl(&k, self.hasher(&k)) {
+            match self.search_tbl(&k, self.hasher(&k)) {
               not_found => none,
               found_first(_, entry) => some(entry.value),
               found_after(_, entry) => some(entry.value)
@@ -281,7 +281,7 @@ mod chained {
         }
 
         fn remove(+k: K) -> option<V> {
-            alt self.search_tbl(&k, self.hasher(&k)) {
+            match self.search_tbl(&k, self.hasher(&k)) {
               not_found => none,
               found_first(idx, entry) => {
                 self.count -= 1u;
@@ -638,7 +638,7 @@ mod tests {
         i = 0u;
         while i < num_to_insert {
             let v = hm.remove(i);
-            alt v {
+            match v {
               option::some(u) => assert (u == i * i),
               option::none => fail
             }
diff --git a/src/libstd/net_ip.rs b/src/libstd/net_ip.rs
index 1cc8dd3bed9..d0b08212952 100644
--- a/src/libstd/net_ip.rs
+++ b/src/libstd/net_ip.rs
@@ -47,7 +47,7 @@ type parse_addr_err = {
  * * ip - a `std::net::ip::ip_addr`
  */
 fn format_addr(ip: ip_addr) -> ~str {
-    alt ip {
+    match ip {
       ipv4(addr) =>  unsafe {
         let result = uv_ip4_name(&addr);
         if result == ~"" {
@@ -103,7 +103,7 @@ fn get_addr(++node: ~str, iotask: iotask)
                     node_ptr,
                     ptr::null(),
                     ptr::null());
-                alt result {
+                match result {
                   0i32 => {
                     set_data_for_req(handle_ptr, handle_data_ptr);
                   }
@@ -134,7 +134,7 @@ mod v4 {
      * * an `ip_addr` of the `ipv4` variant
      */
     fn parse_addr(ip: ~str) -> ip_addr {
-        alt try_parse_addr(ip) {
+        match try_parse_addr(ip) {
           result::ok(addr) => copy(addr),
           result::err(err_data) => fail err_data.err_msg
         }
@@ -155,7 +155,7 @@ mod v4 {
     }
     fn parse_to_ipv4_rep(ip: ~str) -> result::result<ipv4_rep, ~str> {
         let parts = vec::map(str::split_char(ip, '.'), |s| {
-            alt uint::from_str(s) {
+            match uint::from_str(s) {
               some(n) if n <= 255u => n,
               _ => 256u
             }
@@ -220,7 +220,7 @@ mod v6 {
      * * an `ip_addr` of the `ipv6` variant
      */
     fn parse_addr(ip: ~str) -> ip_addr {
-        alt try_parse_addr(ip) {
+        match try_parse_addr(ip) {
           result::ok(addr) => copy(addr),
           result::err(err_data) => fail err_data.err_msg
         }
@@ -326,7 +326,7 @@ mod test {
     }
     #[test]
     fn test_ip_ipv4_bad_parse() {
-        alt v4::try_parse_addr(~"b4df00d") {
+        match v4::try_parse_addr(~"b4df00d") {
           result::err(err_info) => {
             log(debug, fmt!{"got error as expected %?", err_info});
             assert true;
@@ -339,7 +339,7 @@ mod test {
     #[test]
     #[ignore(target_os="win32")]
     fn test_ip_ipv6_bad_parse() {
-        alt v6::try_parse_addr(~"::,~2234k;") {
+        match v6::try_parse_addr(~"::,~2234k;") {
           result::err(err_info) => {
             log(debug, fmt!{"got error as expected %?", err_info});
             assert true;
@@ -364,7 +364,7 @@ mod test {
         log(debug, fmt!{"test_get_addr: Number of results for %s: %?",
                         localhost_name, vec::len(results)});
         for vec::each(results) |r| {
-            let ipv_prefix = alt r {
+            let ipv_prefix = match r {
               ipv4(_) => ~"IPv4",
               ipv6(_) => ~"IPv6"
             };
diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs
index 2ce47a641c1..4e25a42985a 100644
--- a/src/libstd/net_tcp.rs
+++ b/src/libstd/net_tcp.rs
@@ -151,16 +151,16 @@ fn connect(-input_ip: ip::ip_addr, port: uint,
         log(debug, ~"in interact cb for tcp client connect..");
         log(debug, fmt!{"stream_handle_ptr in interact %?",
             stream_handle_ptr});
-        alt uv::ll::tcp_init( loop_ptr, stream_handle_ptr) {
+        match uv::ll::tcp_init( loop_ptr, stream_handle_ptr) {
           0i32 => {
             log(debug, ~"tcp_init successful");
-            alt input_ip {
+            match input_ip {
               ipv4 => {
                 log(debug, ~"dealing w/ ipv4 connection..");
                 let connect_req_ptr =
                     ptr::addr_of((*socket_data_ptr).connect_req);
                 let addr_str = ip::format_addr(input_ip);
-                let connect_result = alt input_ip {
+                let connect_result = match input_ip {
                   ip::ipv4(addr) => {
                     // have to "recreate" the sockaddr_in/6
                     // since the ip_addr discards the port
@@ -185,7 +185,7 @@ fn connect(-input_ip: ip::ip_addr, port: uint,
                         tcp_connect_on_connect_cb)
                   }
                 };
-                alt connect_result {
+                match connect_result {
                   0i32 => {
                     log(debug, ~"tcp_connect successful");
                     // reusable data that we'll have for the
@@ -223,7 +223,7 @@ fn connect(-input_ip: ip::ip_addr, port: uint,
           }
         }
     };
-    alt comm::recv(result_po) {
+    match comm::recv(result_po) {
       conn_success => {
         log(debug, ~"tcp::connect - received success on result_po");
         result::ok(tcp_socket(socket_data))
@@ -234,7 +234,7 @@ fn connect(-input_ip: ip::ip_addr, port: uint,
         // still have to free the malloc'd stream handle..
         rustrt::rust_uv_current_kernel_free(stream_handle_ptr
                                            as *libc::c_void);
-        let tcp_conn_err = alt err_data.err_name {
+        let tcp_conn_err = match err_data.err_name {
           ~"ECONNREFUSED" => connection_refused,
           _ => generic_connect_err(err_data.err_name, err_data.err_msg)
         };
@@ -445,7 +445,7 @@ fn read_future(sock: tcp_socket, timeout_msecs: uint)
  *             // do work here
  *         }
  *     };
- *     alt comm::recv(cont_po) {
+ *     match comm::recv(cont_po) {
  *       // shut down listen()
  *       some(err_data) { comm::send(kill_chan, some(err_data)) }
  *       // wait for next connection
@@ -469,7 +469,7 @@ fn read_future(sock: tcp_socket, timeout_msecs: uint)
 fn accept(new_conn: tcp_new_connection)
     -> result::result<tcp_socket, tcp_err_data> unsafe {
 
-    alt new_conn{
+    match new_conn{
       new_tcp_conn(server_handle_ptr) => {
         let server_data_ptr = uv::ll::get_data_for_uv_handle(
             server_handle_ptr) as *tcp_listen_fc_data;
@@ -501,10 +501,10 @@ fn accept(new_conn: tcp_new_connection)
         log(debug, ~"in interact cb for tcp::accept");
         let loop_ptr = uv::ll::get_loop_for_uv_handle(
             server_handle_ptr);
-        alt uv::ll::tcp_init(loop_ptr, client_stream_handle_ptr) {
+        match uv::ll::tcp_init(loop_ptr, client_stream_handle_ptr) {
           0i32 => {
             log(debug, ~"uv_tcp_init successful for client stream");
-            alt uv::ll::accept(
+            match uv::ll::accept(
                 server_handle_ptr as *libc::c_void,
                 client_stream_handle_ptr as *libc::c_void) {
               0i32 => {
@@ -528,7 +528,7 @@ fn accept(new_conn: tcp_new_connection)
           }
         }
         // UNSAFE LIBUV INTERACTION END
-        alt comm::recv(result_po) {
+        match comm::recv(result_po) {
           some(err_data) => result::err(err_data),
           none => result::ok(tcp_socket(client_socket_data))
         }
@@ -610,13 +610,13 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
         // nested within a comm::listen block)
         let loc_ip = copy(host_ip);
         do iotask::interact(iotask) |loop_ptr| {
-            alt uv::ll::tcp_init(loop_ptr, server_stream_ptr) {
+            match uv::ll::tcp_init(loop_ptr, server_stream_ptr) {
               0i32 => {
                 uv::ll::set_data_for_uv_handle(
                     server_stream_ptr,
                     server_data_ptr);
                 let addr_str = ip::format_addr(loc_ip);
-                let bind_result = alt loc_ip {
+                let bind_result = match loc_ip {
                   ip::ipv4(addr) => {
                     log(debug, fmt!{"addr: %?", addr});
                     let in_addr = uv::ll::ip4_addr(addr_str, port as int);
@@ -630,9 +630,9 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
                                      ptr::addr_of(in_addr))
                   }
                 };
-                alt bind_result {
+                match bind_result {
                   0i32 => {
-                    alt uv::ll::listen(server_stream_ptr,
+                    match uv::ll::listen(server_stream_ptr,
                                        backlog as libc::c_int,
                                        tcp_lfc_on_connection_cb) {
                       0i32 => comm::send(setup_ch, none),
@@ -659,7 +659,7 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
         };
         setup_ch.recv()
     };
-    alt setup_result {
+    match setup_result {
       some(err_data) => {
         do iotask::interact(iotask) |loop_ptr| {
             log(debug, fmt!{"tcp::listen post-kill recv hl interact %?",
@@ -668,7 +668,7 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
             uv::ll::close(server_stream_ptr, tcp_lfc_close_cb);
         };
         stream_closed_po.recv();
-        alt err_data.err_name {
+        match err_data.err_name {
           ~"EACCES" => {
             log(debug, ~"Got EACCES error");
             result::err(access_denied)
@@ -695,7 +695,7 @@ fn listen_common(-host_ip: ip::ip_addr, port: uint, backlog: uint,
             uv::ll::close(server_stream_ptr, tcp_lfc_close_cb);
         };
         stream_closed_po.recv();
-        alt kill_result {
+        match kill_result {
           // some failure post bind/listen
           some(err_data) => result::err(generic_listen_err(err_data.err_name,
                                                            err_data.err_msg)),
@@ -878,7 +878,7 @@ fn read_common_impl(socket_data: *tcp_socket_data, timeout_msecs: uint)
             some(comm::recv(result::get(rs_result)))
         };
         log(debug, ~"tcp::read after recv_timeout");
-        alt read_result {
+        match read_result {
           none => {
             log(debug, ~"tcp::read: timed out..");
             let err_data = {
@@ -905,7 +905,7 @@ fn read_stop_common_impl(socket_data: *tcp_socket_data) ->
     let stop_ch = comm::chan(stop_po);
     do iotask::interact((*socket_data).iotask) |loop_ptr| {
         log(debug, ~"in interact cb for tcp::read_stop");
-        alt uv::ll::read_stop(stream_handle_ptr as *uv::ll::uv_stream_t) {
+        match uv::ll::read_stop(stream_handle_ptr as *uv::ll::uv_stream_t) {
           0i32 => {
             log(debug, ~"successfully called uv_read_stop");
             comm::send(stop_ch, none);
@@ -917,7 +917,7 @@ fn read_stop_common_impl(socket_data: *tcp_socket_data) ->
           }
         }
     };
-    alt comm::recv(stop_po) {
+    match comm::recv(stop_po) {
       some(err_data) => result::err(err_data.to_tcp_err()),
       none => result::ok(())
     }
@@ -933,7 +933,7 @@ fn read_start_common_impl(socket_data: *tcp_socket_data)
     log(debug, ~"in tcp::read_start before interact loop");
     do iotask::interact((*socket_data).iotask) |loop_ptr| {
         log(debug, fmt!{"in tcp::read_start interact cb %?", loop_ptr});
-        alt uv::ll::read_start(stream_handle_ptr as *uv::ll::uv_stream_t,
+        match uv::ll::read_start(stream_handle_ptr as *uv::ll::uv_stream_t,
                                on_alloc_cb,
                                on_tcp_read_cb) {
           0i32 => {
@@ -947,7 +947,7 @@ fn read_start_common_impl(socket_data: *tcp_socket_data)
           }
         }
     };
-    alt comm::recv(start_po) {
+    match comm::recv(start_po) {
       some(err_data) => result::err(err_data.to_tcp_err()),
       none => result::ok((*socket_data).reader_po)
     }
@@ -973,7 +973,7 @@ fn write_common_impl(socket_data_ptr: *tcp_socket_data,
     let write_data_ptr = ptr::addr_of(write_data);
     do iotask::interact((*socket_data_ptr).iotask) |loop_ptr| {
         log(debug, fmt!{"in interact cb for tcp::write %?", loop_ptr});
-        alt uv::ll::write(write_req_ptr,
+        match uv::ll::write(write_req_ptr,
                           stream_handle_ptr,
                           write_buf_vec_ptr,
                           tcp_write_complete_cb) {
@@ -993,7 +993,7 @@ fn write_common_impl(socket_data_ptr: *tcp_socket_data,
     // and waiting here for the write to complete, we should transfer
     // ownership of everything to the I/O task and let it deal with the
     // aftermath, so we don't have to sit here blocking.
-    alt comm::recv(result_po) {
+    match comm::recv(result_po) {
       tcp_write_success => result::ok(()),
       tcp_write_error(err_data) => result::err(err_data.to_tcp_err())
     }
@@ -1024,7 +1024,7 @@ extern fn tcp_lfc_on_connection_cb(handle: *uv::ll::uv_tcp_t,
         as *tcp_listen_fc_data;
     let kill_ch = (*server_data_ptr).kill_ch;
     if (*server_data_ptr).active {
-        alt status {
+        match status {
           0i32 => (*server_data_ptr).on_connect_cb(handle),
           _ => {
             let loop_ptr = uv::ll::get_loop_for_uv_handle(handle);
@@ -1081,7 +1081,7 @@ extern fn on_tcp_read_cb(stream: *uv::ll::uv_stream_t,
     let loop_ptr = uv::ll::get_loop_for_uv_handle(stream);
     let socket_data_ptr = uv::ll::get_data_for_uv_handle(stream)
         as *tcp_socket_data;
-    alt nread as int {
+    match nread as int {
       // incoming err.. probably eof
       -1 => {
         let err_data = uv::ll::get_last_err_data(loop_ptr).to_tcp_err();
@@ -1175,7 +1175,7 @@ extern fn tcp_connect_on_connect_cb(connect_req_ptr: *uv::ll::uv_connect_t,
     log(debug, fmt!{"tcp_connect result_ch %?", result_ch});
     let tcp_stream_ptr =
         uv::ll::get_stream_handle_from_connect_req(connect_req_ptr);
-    alt status {
+    match status {
       0i32 => {
         log(debug, ~"successful tcp connection!");
         comm::send(result_ch, conn_success);
@@ -1336,7 +1336,7 @@ mod test {
                 client_ch,
                 hl_loop)
         };
-        alt actual_resp_result.get_err() {
+        match actual_resp_result.get_err() {
           connection_refused => (),
           _ => fail ~"unknown error.. expected connection_refused"
         }
@@ -1382,7 +1382,7 @@ mod test {
                 client_ch,
                 hl_loop)
         };
-        alt listen_err {
+        match listen_err {
           address_in_use => {
             assert true;
           }
@@ -1401,7 +1401,7 @@ mod test {
                             server_ip,
                             server_port,
                             hl_loop);
-        alt listen_err {
+        match listen_err {
           access_denied => {
             assert true;
           }
@@ -1515,7 +1515,7 @@ mod test {
                         log(debug, ~"SERVER: successfully accepted"+
                             ~"connection!");
                         let received_req_bytes = read(sock, 0u);
-                        alt received_req_bytes {
+                        match received_req_bytes {
                           result::ok(data) => {
                             log(debug, ~"SERVER: got REQ str::from_bytes..");
                             log(debug, fmt!{"SERVER: REQ data len: %?",
@@ -1544,7 +1544,7 @@ mod test {
         });
         // err check on listen_result
         if result::is_err(listen_result) {
-            alt result::get_err(listen_result) {
+            match result::get_err(listen_result) {
               generic_listen_err(name, msg) => {
                 fail fmt!{"SERVER: exited abnormally name %s msg %s",
                                 name, msg};
diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs
index 5c779e37507..215d5b4f5e1 100644
--- a/src/libstd/rope.rs
+++ b/src/libstd/rope.rs
@@ -133,10 +133,10 @@ fn prepend_str(rope: rope, str: @~str) -> rope {
 
 /// Concatenate two ropes
 fn append_rope(left: rope, right: rope) -> rope {
-   alt(left) {
+   match (left) {
      node::empty => return right,
      node::content(left_content) => {
-       alt(right) {
+       match (right) {
          node::empty => return left,
          node::content(right_content) => {
            return node::content(node::concat2(left_content, right_content));
@@ -197,9 +197,9 @@ Section: Keeping ropes healthy
  * to rebalance your rope at some point, before using it for other purposes.
  */
 fn bal(rope:rope) -> rope {
-    alt(rope) {
+    match (rope) {
       node::empty => return rope,
-      node::content(x) => alt(node::bal(x)) {
+      node::content(x) => match (node::bal(x)) {
         option::none    => rope,
         option::some(y) => node::content(y)
       }
@@ -226,7 +226,7 @@ Section: Transforming ropes
  */
 fn sub_chars(rope: rope, char_offset: uint, char_len: uint) -> rope {
     if char_len == 0u { return node::empty; }
-    alt(rope) {
+    match (rope) {
       node::empty => fail,
       node::content(node) => if char_len > node::char_len(node) {
         fail
@@ -251,7 +251,7 @@ fn sub_chars(rope: rope, char_offset: uint, char_len: uint) -> rope {
  */
 fn sub_bytes(rope: rope, byte_offset: uint, byte_len: uint) -> rope {
     if byte_len == 0u { return node::empty; }
-    alt(rope) {
+    match (rope) {
       node::empty => fail,
       node::content(node) =>if byte_len > node::byte_len(node) {
         fail
@@ -276,7 +276,7 @@ Section: Comparing ropes
  * value if `left > right`
  */
 fn cmp(left: rope, right: rope) -> int {
-    alt((left, right)) {
+    match ((left, right)) {
       (node::empty, node::empty) => return 0,
       (node::empty, _)     => return -1,
       (_, node::empty)     => return  1,
@@ -379,7 +379,7 @@ Section: Iterating
  * that is if `it` returned `false` at any point.
  */
 fn loop_chars(rope: rope, it: fn(char) -> bool) -> bool {
-   alt(rope) {
+   match (rope) {
       node::empty => return true,
       node::content(x) => return node::loop_chars(x, it)
    }
@@ -422,7 +422,7 @@ fn iter_chars(rope: rope, it: fn(char)) {
  * that is if `it` returned `false` at any point.
  */
 fn loop_leaves(rope: rope, it: fn(node::leaf) -> bool) -> bool{
-   alt(rope) {
+   match (rope) {
       node::empty => return true,
       node::content(x) => return node::loop_leaves(x, it)
    }
@@ -431,7 +431,7 @@ fn loop_leaves(rope: rope, it: fn(node::leaf) -> bool) -> bool{
 mod iterator {
     mod leaf {
         fn start(rope: rope) -> node::leaf_iterator::t {
-            alt(rope) {
+            match (rope) {
               node::empty      => return node::leaf_iterator::empty(),
               node::content(x) => return node::leaf_iterator::start(x)
             }
@@ -442,7 +442,7 @@ mod iterator {
     }
     mod char {
         fn start(rope: rope) -> node::char_iterator::t {
-            alt(rope) {
+            match (rope) {
               node::empty      => return node::char_iterator::empty(),
               node::content(x) => return node::char_iterator::start(x)
             }
@@ -469,7 +469,7 @@ mod iterator {
  * Constant time.
  */
 fn height(rope: rope) -> uint {
-   alt(rope) {
+   match (rope) {
       node::empty      => return 0u,
       node::content(x) => return node::height(x)
    }
@@ -485,7 +485,7 @@ fn height(rope: rope) -> uint {
  * Constant time.
  */
 pure fn char_len(rope: rope) -> uint {
-   alt(rope) {
+   match (rope) {
      node::empty            => return 0u,
      node::content(x)       => return node::char_len(x)
    }
@@ -499,7 +499,7 @@ pure fn char_len(rope: rope) -> uint {
  * Constant time.
  */
 pure fn byte_len(rope: rope) -> uint {
-   alt(rope) {
+   match (rope) {
      node::empty            => return 0u,
      node::content(x)       => return node::byte_len(x)
    }
@@ -522,7 +522,7 @@ pure fn byte_len(rope: rope) -> uint {
  * rope + the (bounded) length of the largest leaf.
  */
 fn char_at(rope: rope, pos: uint) -> char {
-   alt(rope) {
+   match (rope) {
       node::empty => fail,
       node::content(x) => return node::char_at(x, pos)
    }
@@ -730,14 +730,14 @@ mod node {
 
     pure fn byte_len(node: @node) -> uint {
         //FIXME (#2744): Could we do this without the pattern-matching?
-        alt(*node) {
+        match (*node) {
           leaf(y)   => return y.byte_len,
           concat(y) => return y.byte_len
         }
     }
 
     pure fn char_len(node: @node) -> uint {
-        alt(*node) {
+        match (*node) {
           leaf(y)   => return y.char_len,
           concat(y) => return y.char_len
         }
@@ -800,7 +800,7 @@ mod node {
         let mut offset = 0u;//Current position in the buffer
         let it = leaf_iterator::start(node);
         loop {
-            alt(leaf_iterator::next(it)) {
+            match (leaf_iterator::next(it)) {
               option::none => break,
               option::some(x) => {
                 //FIXME (#2744): Replace with memcpy or something similar
@@ -827,7 +827,7 @@ mod node {
      * This function executes in linear time.
      */
     fn flatten(node: @node) -> @node unsafe {
-        alt(*node) {
+        match (*node) {
           leaf(_) => return node,
           concat(x) => {
             return @leaf({
@@ -861,7 +861,7 @@ mod node {
         let mut forest = ~[mut];
         let it = leaf_iterator::start(node);
         loop {
-            alt (leaf_iterator::next(it)) {
+            match (leaf_iterator::next(it)) {
               option::none    => break,
               option::some(x) => vec::push(forest, @leaf(x))
             }
@@ -898,7 +898,7 @@ mod node {
             if byte_offset == 0u && byte_len == node::byte_len(node) {
                 return node;
             }
-            alt(*node) {
+            match (*node) {
               node::leaf(x) => {
                 let char_len =
                     str::count_chars(*x.content, byte_offset, byte_len);
@@ -956,7 +956,7 @@ mod node {
         let mut node        = node;
         let mut char_offset = char_offset;
         loop {
-            alt(*node) {
+            match (*node) {
               node::leaf(x) => {
                 if char_offset == 0u && char_len == x.char_len {
                     return node;
@@ -1007,7 +1007,7 @@ mod node {
     }
 
     fn height(node: @node) -> uint {
-        alt(*node) {
+        match (*node) {
           leaf(_)   => return 0u,
           concat(x) => return x.height
         }
@@ -1018,7 +1018,7 @@ mod node {
         let itb = char_iterator::start(b);
         let mut result = 0;
         while result == 0 {
-            alt((char_iterator::next(ita), char_iterator::next(itb))) {
+            match ((char_iterator::next(ita), char_iterator::next(itb))) {
               (option::none, option::none) => break,
               (option::some(chara), option::some(charb)) => {
                 result = char::cmp(chara, charb);
@@ -1059,7 +1059,7 @@ mod node {
     fn loop_leaves(node: @node, it: fn(leaf) -> bool) -> bool{
         let mut current = node;
         loop {
-            alt(*current) {
+            match (*current) {
               leaf(x) => return it(x),
               concat(x) => if loop_leaves(x.left, it) { //non tail call
                 current = x.right;       //tail call
@@ -1091,7 +1091,7 @@ mod node {
         let mut node    = node;
         let mut pos     = pos;
         loop {
-            alt *node {
+            match *node {
               leaf(x) => return str::char_at(*x.content, pos),
               concat({left, right, _}) => {
                 let left_len = char_len(left);
@@ -1126,7 +1126,7 @@ mod node {
             loop {
                 let current = it.stack[it.stackpos];
                 it.stackpos -= 1;
-                alt(*current) {
+                match (*current) {
                   concat(x) => {
                     it.stackpos += 1;
                     it.stack[it.stackpos] = x.right;
@@ -1164,11 +1164,11 @@ mod node {
 
         fn next(it: t) -> option<char> {
             loop {
-                alt(get_current_or_next_leaf(it)) {
+                match (get_current_or_next_leaf(it)) {
                   option::none => return option::none,
                   option::some(_) => {
                     let next_char = get_next_char_in_leaf(it);
-                    alt(next_char) {
+                    match (next_char) {
                       option::none => again,
                       option::some(_) => return next_char
                     }
@@ -1178,11 +1178,11 @@ mod node {
         }
 
         fn get_current_or_next_leaf(it: t) -> option<leaf> {
-            alt(it.leaf) {
+            match (it.leaf) {
               option::some(_) => return it.leaf,
               option::none => {
                 let next = leaf_iterator::next(it.leaf_iterator);
-                alt(next) {
+                match (next) {
                   option::none => return option::none,
                   option::some(_) => {
                     it.leaf          = next;
@@ -1195,7 +1195,7 @@ mod node {
         }
 
         fn get_next_char_in_leaf(it: t) -> option<char> {
-            alt copy it.leaf {
+            match copy it.leaf {
               option::none => return option::none,
               option::some(aleaf) => {
                 if it.leaf_byte_pos >= aleaf.byte_len {
@@ -1220,12 +1220,12 @@ mod tests {
 
     //Utility function, used for sanity check
     fn rope_to_string(r: rope) -> ~str {
-        alt(r) {
+        match (r) {
           node::empty => return ~"",
           node::content(x) => {
             let str = @mut ~"";
             fn aux(str: @mut ~str, node: @node::node) unsafe {
-                alt(*node) {
+                match (*node) {
                   node::leaf(x) => {
                     *str += str::slice(
                         *x.content, x.byte_offset,
@@ -1274,7 +1274,7 @@ mod tests {
         let rope_iter   = iterator::char::start(r);
         let mut equal   = true;
         while equal {
-            alt(node::char_iterator::next(rope_iter)) {
+            match (node::char_iterator::next(rope_iter)) {
               option::none => {
                 if string_iter < string_len {
                     equal = false;
@@ -1301,7 +1301,7 @@ mod tests {
         let mut len = 0u;
         let it  = iterator::char::start(r);
         loop {
-            alt(node::char_iterator::next(it)) {
+            match (node::char_iterator::next(it)) {
               option::none => break,
               option::some(_) => len += 1u
             }
diff --git a/src/libstd/serialization.rs b/src/libstd/serialization.rs
index 622d31c00b9..86421ea3e74 100644
--- a/src/libstd/serialization.rs
+++ b/src/libstd/serialization.rs
@@ -243,7 +243,7 @@ fn deserialize_bool<D: deserializer>(d: D) -> bool {
 
 fn serialize_option<S: serializer,T>(s: S, v: option<T>, st: fn(T)) {
     do s.emit_enum(~"option") {
-        alt v {
+        match v {
           none => do s.emit_enum_variant(~"none", 0u, 0u) {
           }
 
@@ -260,7 +260,7 @@ fn deserialize_option<D: deserializer,T: copy>(d: D, st: fn() -> T)
     -> option<T> {
     do d.read_enum(~"option") {
         do d.read_enum_variant |i| {
-            alt check i {
+            match check i {
               0u => none,
               1u => some(d.read_enum_variant_arg(0u, || st() ))
             }
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs
index 2fe09f75d56..6ed2a397b3f 100644
--- a/src/libstd/smallintmap.rs
+++ b/src/libstd/smallintmap.rs
@@ -48,7 +48,7 @@ pure fn find<T: copy>(self: smallintmap<T>, key: uint) -> option<T> {
  * If the key does not exist in the map
  */
 pure fn get<T: copy>(self: smallintmap<T>, key: uint) -> T {
-    alt find(self, key) {
+    match find(self, key) {
       none => {
         error!{"smallintmap::get(): key not present"};
         fail;
@@ -67,7 +67,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> {
     fn size() -> uint {
         let mut sz = 0u;
         for self.v.each |item| {
-            alt item {
+            match item {
               some(_) => sz += 1u,
               _ => ()
             }
@@ -103,7 +103,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> {
     fn each(it: fn(+key: uint, +value: V) -> bool) {
         let mut idx = 0u, l = self.v.len();
         while idx < l {
-            alt self.v.get_elt(idx) {
+            match self.v.get_elt(idx) {
               some(elt) => if !it(idx, elt) { break }
               none => ()
             }
@@ -119,7 +119,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> {
     fn each_ref(it: fn(key: &uint, value: &V) -> bool) {
         let mut idx = 0u, l = self.v.len();
         while idx < l {
-            alt self.v.get_elt(idx) {
+            match self.v.get_elt(idx) {
               some(elt) => if !it(&idx, &elt) { break }
               none => ()
             }
diff --git a/src/libstd/tempfile.rs b/src/libstd/tempfile.rs
index a67164ee107..1ebfe695519 100644
--- a/src/libstd/tempfile.rs
+++ b/src/libstd/tempfile.rs
@@ -21,7 +21,7 @@ fn mkdtemp(prefix: ~str, suffix: ~str) -> option<~str> {
 #[test]
 fn test_mkdtemp() {
     let r = mkdtemp(~"./", ~"foobar");
-    alt r {
+    match r {
         some(p) => {
             os::remove_dir(p);
             assert(str::ends_with(p, ~"foobar"));
diff --git a/src/libstd/term.rs b/src/libstd/term.rs
index 1d2ae7bca5d..0d311223847 100644
--- a/src/libstd/term.rs
+++ b/src/libstd/term.rs
@@ -35,7 +35,7 @@ fn reset(writer: io::writer) {
 fn color_supported() -> bool {
     let supported_terms = ~[~"xterm-color", ~"xterm",
                            ~"screen-bce", ~"xterm-256color"];
-    return alt os::getenv(~"TERM") {
+    return match os::getenv(~"TERM") {
           option::some(env) => {
             for vec::each(supported_terms) |term| {
                 if term == env { return true; }
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 890bddb3519..a4b52c51685 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -52,7 +52,7 @@ type test_desc = {
 // arguments and a vector of test_descs (generated at compile time).
 fn test_main(args: ~[~str], tests: ~[test_desc]) {
     let opts =
-        alt parse_opts(args) {
+        match parse_opts(args) {
           either::left(o) => o,
           either::right(m) => fail m
         };
@@ -69,7 +69,7 @@ fn parse_opts(args: ~[~str]) -> opt_res {
     let args_ = vec::tail(args);
     let opts = ~[getopts::optflag(~"ignored"), getopts::optopt(~"logfile")];
     let matches =
-        alt getopts::getopts(args_, opts) {
+        match getopts::getopts(args_, opts) {
           ok(m) => m,
           err(f) => return either::right(getopts::fail_str(f))
         };
@@ -105,7 +105,7 @@ fn run_tests_console(opts: test_opts,
                      tests: ~[test_desc]) -> bool {
 
     fn callback(event: testevent, st: console_test_state) {
-        alt event {
+        match event {
           te_filtered(filtered_tests) => {
             st.total = vec::len(filtered_tests);
             let noun = if st.total != 1u { ~"tests" } else { ~"test" };
@@ -113,11 +113,11 @@ fn run_tests_console(opts: test_opts,
           }
           te_wait(test) => st.out.write_str(fmt!{"test %s ... ", test.name}),
           te_result(test, result) => {
-            alt st.log_out {
+            match st.log_out {
                 some(f) => write_log(f, result, test),
                 none => ()
             }
-            alt result {
+            match result {
               tr_ok => {
                 st.passed += 1u;
                 write_ok(st.out, st.use_color);
@@ -139,8 +139,9 @@ fn run_tests_console(opts: test_opts,
         }
     }
 
-    let log_out = alt opts.logfile {
-        some(path) => alt io::file_writer(path, ~[io::create, io::truncate]) {
+    let log_out = match opts.logfile {
+        some(path) => match io::file_writer(path,
+                                            ~[io::create, io::truncate]) {
           result::ok(w) => some(w),
           result::err(s) => {
               fail(fmt!{"can't open output file: %s", s})
@@ -180,7 +181,7 @@ fn run_tests_console(opts: test_opts,
 
     fn write_log(out: io::writer, result: test_result, test: test_desc) {
         out.write_line(fmt!{"%s %s",
-                    alt result {
+                    match result {
                         tr_ok => ~"ok",
                         tr_failed => ~"failed",
                         tr_ignored => ~"ignored"
@@ -334,7 +335,7 @@ fn filter_tests(opts: test_opts,
         filtered
     } else {
         let filter_str =
-            alt opts.filter {
+            match opts.filter {
           option::some(f) => f,
           option::none => ~""
         };
@@ -479,7 +480,7 @@ mod tests {
     #[test]
     fn first_free_arg_should_be_a_filter() {
         let args = ~[~"progname", ~"filter"];
-        let opts = alt parse_opts(args) {
+        let opts = match parse_opts(args) {
           either::left(o) => o,
           _ => fail ~"Malformed arg in first_free_arg_should_be_a_filter"
         };
@@ -489,7 +490,7 @@ mod tests {
     #[test]
     fn parse_ignored_flag() {
         let args = ~[~"progname", ~"filter", ~"--ignored"];
-        let opts = alt parse_opts(args) {
+        let opts = match parse_opts(args) {
           either::left(o) => o,
           _ => fail ~"Malformed arg in parse_ignored_flag"
         };
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 23b6bf22276..3a4b5f3ccd9 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -181,7 +181,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             let {ch, next} = str::char_range_at(s, pos);
             pos = next;
 
-            alt ch {
+            match ch {
               '0' to '9' => {
                 value = value * 10_i32 + (ch as i32 - '0' as i32);
               }
@@ -208,8 +208,8 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
 
     fn parse_type(s: ~str, pos: uint, ch: char, tm: tm_mut)
       -> result<uint, ~str> {
-        alt ch {
-          'A' => alt match_strs(s, pos, ~[
+        match ch {
+          'A' => match match_strs(s, pos, ~[
               (~"Sunday", 0_i32),
               (~"Monday", 1_i32),
               (~"Tuesday", 2_i32),
@@ -221,7 +221,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             some(item) => { let (v, pos) = item; tm.tm_wday = v; ok(pos) }
             none => err(~"Invalid day")
           }
-          'a' => alt match_strs(s, pos, ~[
+          'a' => match match_strs(s, pos, ~[
               (~"Sun", 0_i32),
               (~"Mon", 1_i32),
               (~"Tue", 2_i32),
@@ -233,7 +233,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             some(item) => { let (v, pos) = item; tm.tm_wday = v; ok(pos) }
             none => err(~"Invalid day")
           }
-          'B' => alt match_strs(s, pos, ~[
+          'B' => match match_strs(s, pos, ~[
               (~"January", 0_i32),
               (~"February", 1_i32),
               (~"March", 2_i32),
@@ -250,7 +250,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             some(item) => { let (v, pos) = item; tm.tm_mon = v; ok(pos) }
             none => err(~"Invalid month")
           }
-          'b' | 'h' => alt match_strs(s, pos, ~[
+          'b' | 'h' => match match_strs(s, pos, ~[
               (~"Jan", 0_i32),
               (~"Feb", 1_i32),
               (~"Mar", 2_i32),
@@ -267,7 +267,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             some(item) => { let (v, pos) = item; tm.tm_mon = v; ok(pos) }
             none => err(~"Invalid month")
           }
-          'C' => alt match_digits(s, pos, 2u, false) {
+          'C' => match match_digits(s, pos, 2u, false) {
             some(item) => {
                 let (v, pos) = item;
                   tm.tm_year += (v * 100_i32) - 1900_i32;
@@ -293,11 +293,11 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
                 .chain(|pos| parse_char(s, pos, '/'))
                 .chain(|pos| parse_type(s, pos, 'y', tm))
           }
-          'd' => alt match_digits(s, pos, 2u, false) {
+          'd' => match match_digits(s, pos, 2u, false) {
             some(item) => { let (v, pos) = item; tm.tm_mday = v; ok(pos) }
             none => err(~"Invalid day of the month")
           }
-          'e' => alt match_digits(s, pos, 2u, true) {
+          'e' => match match_digits(s, pos, 2u, true) {
             some(item) => { let (v, pos) = item; tm.tm_mday = v; ok(pos) }
             none => err(~"Invalid day of the month")
           }
@@ -310,14 +310,14 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           }
           'H' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, false) {
+            match match_digits(s, pos, 2u, false) {
               some(item) => { let (v, pos) = item; tm.tm_hour = v; ok(pos) }
               none => err(~"Invalid hour")
             }
           }
           'I' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, false) {
+            match match_digits(s, pos, 2u, false) {
               some(item) => {
                   let (v, pos) = item;
                   tm.tm_hour = if v == 12_i32 { 0_i32 } else { v };
@@ -328,7 +328,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           }
           'j' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 3u, false) {
+            match match_digits(s, pos, 3u, false) {
               some(item) => {
                 let (v, pos) = item;
                 tm.tm_yday = v - 1_i32;
@@ -339,14 +339,14 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           }
           'k' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, true) {
+            match match_digits(s, pos, 2u, true) {
               some(item) => { let (v, pos) = item; tm.tm_hour = v; ok(pos) }
               none => err(~"Invalid hour")
             }
           }
           'l' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, true) {
+            match match_digits(s, pos, 2u, true) {
               some(item) => {
                   let (v, pos) = item;
                   tm.tm_hour = if v == 12_i32 { 0_i32 } else { v };
@@ -357,14 +357,14 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           }
           'M' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, false) {
+            match match_digits(s, pos, 2u, false) {
               some(item) => { let (v, pos) = item; tm.tm_min = v; ok(pos) }
               none => err(~"Invalid minute")
             }
           }
           'm' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, false) {
+            match match_digits(s, pos, 2u, false) {
               some(item) => {
                 let (v, pos) = item;
                 tm.tm_mon = v - 1_i32;
@@ -374,11 +374,15 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             }
           }
           'n' => parse_char(s, pos, '\n'),
-          'P' => alt match_strs(s, pos, ~[(~"am", 0_i32), (~"pm", 12_i32)]) {
+          'P' => match match_strs(s, pos,
+                                  ~[(~"am", 0_i32), (~"pm", 12_i32)]) {
+
             some(item) => { let (v, pos) = item; tm.tm_hour += v; ok(pos) }
             none => err(~"Invalid hour")
           }
-          'p' => alt match_strs(s, pos, ~[(~"AM", 0_i32), (~"PM", 12_i32)]) {
+          'p' => match match_strs(s, pos,
+                                  ~[(~"AM", 0_i32), (~"PM", 12_i32)]) {
+
             some(item) => { let (v, pos) = item; tm.tm_hour += v; ok(pos) }
             none => err(~"Invalid hour")
           }
@@ -398,7 +402,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           }
           'S' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, false) {
+            match match_digits(s, pos, 2u, false) {
               some(item) => {
                 let (v, pos) = item;
                 tm.tm_sec = v;
@@ -418,7 +422,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           't' => parse_char(s, pos, '\t'),
           'u' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 1u, false) {
+            match match_digits(s, pos, 1u, false) {
               some(item) => {
                 let (v, pos) = item;
                 tm.tm_wday = v;
@@ -437,7 +441,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           //'W' {}
           'w' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 1u, false) {
+            match match_digits(s, pos, 1u, false) {
               some(item) => { let (v, pos) = item; tm.tm_wday = v; ok(pos) }
               none => err(~"Invalid weekday")
             }
@@ -446,7 +450,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           //'x' {}
           'Y' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 4u, false) {
+            match match_digits(s, pos, 4u, false) {
               some(item) => {
                 let (v, pos) = item;
                 tm.tm_year = v - 1900_i32;
@@ -457,7 +461,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
           }
           'y' => {
             // FIXME (#2350): range check.
-            alt match_digits(s, pos, 2u, false) {
+            match match_digits(s, pos, 2u, false) {
               some(item) => {
                 let (v, pos) = item;
                 tm.tm_year = v - 1900_i32;
@@ -489,7 +493,7 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
             let {ch, next} = str::char_range_at(s, pos);
 
             if ch == '+' || ch == '-' {
-                alt match_digits(s, next, 4u, false) {
+                match match_digits(s, next, 4u, false) {
                   some(item) => {
                     let (v, pos) = item;
                     if v == 0_i32 {
@@ -534,8 +538,8 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
         while !rdr.eof() && pos < len {
             let {ch, next} = str::char_range_at(s, pos);
 
-            alt rdr.read_char() {
-              '%' => alt parse_type(s, pos, rdr.read_char(), tm) {
+            match rdr.read_char() {
+              '%' => match parse_type(s, pos, rdr.read_char(), tm) {
                 ok(next) => pos = next,
                   err(e) => { result = err(e); break; }
               }
@@ -568,8 +572,8 @@ fn strptime(s: ~str, format: ~str) -> result<tm, ~str> {
 fn strftime(format: ~str, tm: tm) -> ~str {
     fn parse_type(ch: char, tm: tm) -> ~str {
         //FIXME (#2350): Implement missing types.
-        alt check ch {
-          'A' => alt check tm.tm_wday as int {
+        match check ch {
+          'A' => match check tm.tm_wday as int {
             0 => ~"Sunday",
             1 => ~"Monday",
             2 => ~"Tuesday",
@@ -578,7 +582,7 @@ fn strftime(format: ~str, tm: tm) -> ~str {
             5 => ~"Friday",
             6 => ~"Saturday"
           }
-          'a' => alt check tm.tm_wday as int {
+          'a' => match check tm.tm_wday as int {
             0 => ~"Sun",
             1 => ~"Mon",
             2 => ~"Tue",
@@ -587,7 +591,7 @@ fn strftime(format: ~str, tm: tm) -> ~str {
             5 => ~"Fri",
             6 => ~"Sat"
           }
-          'B' => alt check tm.tm_mon as int {
+          'B' => match check tm.tm_mon as int {
             0 => ~"January",
             1 => ~"February",
             2 => ~"March",
@@ -601,7 +605,7 @@ fn strftime(format: ~str, tm: tm) -> ~str {
             10 => ~"November",
             11 => ~"December"
           }
-          'b' | 'h' => alt check tm.tm_mon as int {
+          'b' | 'h' => match check tm.tm_mon as int {
             0 => ~"Jan",
             1 => ~"Feb",
             2 => ~"Mar",
@@ -716,7 +720,7 @@ fn strftime(format: ~str, tm: tm) -> ~str {
 
     do io::with_str_reader(format) |rdr| {
         while !rdr.eof() {
-            alt rdr.read_char() {
+            match rdr.read_char() {
                 '%' => buf += parse_type(rdr.read_char(), tm),
                 ch => str::push_char(buf, ch)
             }
@@ -932,7 +936,7 @@ mod tests {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();
 
-        alt strptime(~"", ~"") {
+        match strptime(~"", ~"") {
           ok(tm) => {
             assert tm.tm_sec == 0_i32;
             assert tm.tm_min == 0_i32;
@@ -954,7 +958,7 @@ mod tests {
         assert strptime(~"Fri Feb 13 15:31:30", format)
             == err(~"Invalid time");
 
-        alt strptime(~"Fri Feb 13 15:31:30 2009", format) {
+        match strptime(~"Fri Feb 13 15:31:30 2009", format) {
           err(e) => fail e,
           ok(tm) => {
             assert tm.tm_sec == 30_i32;
@@ -973,7 +977,7 @@ mod tests {
         }
 
         fn test(s: ~str, format: ~str) -> bool {
-            alt strptime(s, format) {
+            match strptime(s, format) {
               ok(tm) => tm.strftime(format) == s,
               err(e) => fail e
             }
diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs
index de629d98d63..d19d7a1adcc 100644
--- a/src/libstd/timer.rs
+++ b/src/libstd/timer.rs
@@ -215,7 +215,7 @@ mod test {
                 delayed_send(hl_loop, 1u, test_ch, expected);
             };
 
-            alt recv_timeout(hl_loop, 10u, test_po) {
+            match recv_timeout(hl_loop, 10u, test_po) {
               some(val) => {
                 assert val == expected;
                 successes += 1;
@@ -243,7 +243,7 @@ mod test {
                 delayed_send(hl_loop, 1000u, test_ch, expected);
             };
 
-            alt recv_timeout(hl_loop, 1u, test_po) {
+            match recv_timeout(hl_loop, 1u, test_po) {
               none => successes += 1,
               _ => failures += 1
             };
diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs
index ab7330fb1ee..65dbadb4a53 100644
--- a/src/libstd/treemap.rs
+++ b/src/libstd/treemap.rs
@@ -30,7 +30,7 @@ fn treemap<K, V>() -> treemap<K, V> { @mut none }
 
 /// Insert a value into the map
 fn insert<K: copy, V: copy>(m: &mut tree_edge<K, V>, k: K, v: V) {
-    alt copy *m {
+    match copy *m {
       none => {
         *m = some(@tree_node({key: k,
                               mut value: v,
@@ -52,7 +52,7 @@ fn insert<K: copy, V: copy>(m: &mut tree_edge<K, V>, k: K, v: V) {
 
 /// Find a value based on the key
 fn find<K: copy, V: copy>(m: &const tree_edge<K, V>, k: K) -> option<V> {
-    alt copy *m {
+    match copy *m {
       none => none,
 
       // FIXME (#2808): was that an optimization?
@@ -70,7 +70,7 @@ fn find<K: copy, V: copy>(m: &const tree_edge<K, V>, k: K) -> option<V> {
 
 /// Visit all pairs in the map in order.
 fn traverse<K, V: copy>(m: &const tree_edge<K, V>, f: fn(K, V)) {
-    alt copy *m {
+    match copy *m {
       none => (),
       some(node) => {
         traverse(&const node.left, f);
diff --git a/src/libstd/uv_global_loop.rs b/src/libstd/uv_global_loop.rs
index 52e4879c0b2..b2ae1de6e4a 100644
--- a/src/libstd/uv_global_loop.rs
+++ b/src/libstd/uv_global_loop.rs
@@ -56,7 +56,7 @@ fn get_monitor_task_gl() -> iotask unsafe {
             let hl_loop = spawn_loop();
             loop {
                 debug!{"in outer_loop..."};
-                alt select2(weak_exit_po, msg_po) {
+                match select2(weak_exit_po, msg_po) {
                   left(weak_exit) => {
                     // all normal tasks have ended, tell the
                     // libuv loop to tear_down, then exit
diff --git a/src/libstd/uv_iotask.rs b/src/libstd/uv_iotask.rs
index 5b9d3b1f2f2..80d1053570e 100644
--- a/src/libstd/uv_iotask.rs
+++ b/src/libstd/uv_iotask.rs
@@ -144,7 +144,7 @@ extern fn wake_up_cb(async_handle: *ll::uv_async_t,
     let msg_po = (*data).msg_po;
 
     while msg_po.peek() {
-        alt msg_po.recv() {
+        match msg_po.recv() {
           interaction(cb) => cb(loop_ptr),
           teardown_loop => begin_teardown(data)
         }
diff --git a/src/libstd/uv_ll.rs b/src/libstd/uv_ll.rs
index 9d120cce742..26b95a9a37b 100644
--- a/src/libstd/uv_ll.rs
+++ b/src/libstd/uv_ll.rs
@@ -848,7 +848,7 @@ unsafe fn ip6_name(src: &sockaddr_in6) -> ~str {
                         src_unsafe_ptr, src});
         let result = rustrt::rust_uv_ip6_name(src_unsafe_ptr,
                                               dst_buf, size as libc::size_t);
-        alt result {
+        match result {
           0i32 => str::unsafe::from_buf(dst_buf),
           _ => ~""
         }