about summary refs log tree commit diff
path: root/src/rustc
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-07 13:35:51 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-07 13:35:51 -0700
commitbc267c696c015525ea303e03d448d1507b6afeb6 (patch)
tree1a5ad468deba1a5b152caddfc88a1663bb909c5b /src/rustc
parent92ef17aaebb28a8fe6579f669a3ee162c931d9dd (diff)
downloadrust-bc267c696c015525ea303e03d448d1507b6afeb6.tar.gz
rust-bc267c696c015525ea303e03d448d1507b6afeb6.zip
syntax: Rename expr_alt to expr_match
Diffstat (limited to 'src/rustc')
-rw-r--r--src/rustc/middle/borrowck/categorization.rs2
-rw-r--r--src/rustc/middle/borrowck/gather_loans.rs2
-rw-r--r--src/rustc/middle/check_alt.rs2
-rw-r--r--src/rustc/middle/liveness.rs6
-rw-r--r--src/rustc/middle/region.rs2
-rw-r--r--src/rustc/middle/trans/base.rs2
-rw-r--r--src/rustc/middle/trans/type_use.rs2
-rw-r--r--src/rustc/middle/tstate/pre_post_conditions.rs2
-rw-r--r--src/rustc/middle/tstate/states.rs2
-rw-r--r--src/rustc/middle/typeck/check.rs2
-rw-r--r--src/rustc/util/ppaux.rs4
11 files changed, 14 insertions, 14 deletions
diff --git a/src/rustc/middle/borrowck/categorization.rs b/src/rustc/middle/borrowck/categorization.rs
index 6ef392a120e..2d76607e8fa 100644
--- a/src/rustc/middle/borrowck/categorization.rs
+++ b/src/rustc/middle/borrowck/categorization.rs
@@ -177,7 +177,7 @@ impl public_methods for borrowck_ctxt {
           ast::expr_vstore(*) | ast::expr_vec(*) | ast::expr_tup(*) |
           ast::expr_if(*) | ast::expr_log(*) |
           ast::expr_binary(*) | ast::expr_while(*) |
-          ast::expr_block(*) | ast::expr_loop(*) | ast::expr_alt(*) |
+          ast::expr_block(*) | ast::expr_loop(*) | ast::expr_match(*) |
           ast::expr_lit(*) | ast::expr_break | ast::expr_mac(*) |
           ast::expr_again | ast::expr_rec(*) | ast::expr_struct(*) |
           ast::expr_unary_move(*) | ast::expr_repeat(*) => {
diff --git a/src/rustc/middle/borrowck/gather_loans.rs b/src/rustc/middle/borrowck/gather_loans.rs
index 23baa0976f8..8595ad6b132 100644
--- a/src/rustc/middle/borrowck/gather_loans.rs
+++ b/src/rustc/middle/borrowck/gather_loans.rs
@@ -171,7 +171,7 @@ fn req_loans_in_expr(ex: @ast::expr,
         visit::visit_expr(ex, self, vt);
       }
 
-      ast::expr_alt(ex_v, arms, _) => {
+      ast::expr_match(ex_v, arms, _) => {
         let cmt = self.bccx.cat_expr(ex_v);
         for arms.each |arm| {
             for arm.pats.each |pat| {
diff --git a/src/rustc/middle/check_alt.rs b/src/rustc/middle/check_alt.rs
index 6b135e2e256..796c30a31c0 100644
--- a/src/rustc/middle/check_alt.rs
+++ b/src/rustc/middle/check_alt.rs
@@ -23,7 +23,7 @@ fn check_crate(tcx: ty::ctxt, crate: @crate) {
 fn check_expr(tcx: ty::ctxt, ex: @expr, &&s: (), v: visit::vt<()>) {
     visit::visit_expr(ex, s, v);
     match ex.node {
-      expr_alt(scrut, arms, mode) => {
+      expr_match(scrut, arms, mode) => {
         check_arms(tcx, arms);
         /* Check for exhaustiveness */
          // Check for empty enum, because is_useful only works on inhabited
diff --git a/src/rustc/middle/liveness.rs b/src/rustc/middle/liveness.rs
index 0daec1693f1..b6fc75cfb05 100644
--- a/src/rustc/middle/liveness.rs
+++ b/src/rustc/middle/liveness.rs
@@ -453,7 +453,7 @@ fn visit_expr(expr: @expr, &&self: @ir_maps, vt: vt<@ir_maps>) {
       }
 
       // live nodes required for interesting control flow:
-      expr_if(*) | expr_alt(*) | expr_while(*) | expr_loop(*) => {
+      expr_if(*) | expr_match(*) | expr_while(*) | expr_loop(*) => {
         (*self).add_live_node_for_node(expr.id, lnk_expr(expr.span));
         visit::visit_expr(expr, self, vt);
       }
@@ -966,7 +966,7 @@ class liveness {
             self.propagate_through_loop(expr, none, blk, succ)
           }
 
-          expr_alt(e, arms, _) => {
+          expr_match(e, arms, _) => {
             //
             //      (e)
             //       |
@@ -1449,7 +1449,7 @@ fn check_expr(expr: @expr, &&self: @liveness, vt: vt<@liveness>) {
       }
 
       // no correctness conditions related to liveness
-      expr_if(*) | expr_alt(*) |
+      expr_if(*) | expr_match(*) |
       expr_while(*) | expr_loop(*) |
       expr_index(*) | expr_field(*) | expr_vstore(*) |
       expr_vec(*) | expr_rec(*) | expr_tup(*) |
diff --git a/src/rustc/middle/region.rs b/src/rustc/middle/region.rs
index 91ba7ea60d7..3dc7d1b9df8 100644
--- a/src/rustc/middle/region.rs
+++ b/src/rustc/middle/region.rs
@@ -237,7 +237,7 @@ fn resolve_expr(expr: @ast::expr, cx: ctxt, visitor: visit::vt<ctxt>) {
         debug!{"node %d: %s", expr.id, pprust::expr_to_str(expr)};
         new_cx.parent = some(expr.id);
       }
-      ast::expr_alt(subexpr, _, _) => {
+      ast::expr_match(subexpr, _, _) => {
         debug!{"node %d: %s", expr.id, pprust::expr_to_str(expr)};
         new_cx.parent = some(expr.id);
       }
diff --git a/src/rustc/middle/trans/base.rs b/src/rustc/middle/trans/base.rs
index 2993d23d180..81ea48f9501 100644
--- a/src/rustc/middle/trans/base.rs
+++ b/src/rustc/middle/trans/base.rs
@@ -3665,7 +3665,7 @@ fn trans_expr(bcx: block, e: @ast::expr, dest: dest) -> block {
           ast::expr_if(cond, thn, els) => {
             return trans_if(bcx, cond, thn, els, dest);
           }
-          ast::expr_alt(expr, arms, mode) => {
+          ast::expr_match(expr, arms, mode) => {
             return alt::trans_alt(bcx, e, expr, arms, mode, dest);
           }
           ast::expr_block(blk) => {
diff --git a/src/rustc/middle/trans/type_use.rs b/src/rustc/middle/trans/type_use.rs
index b7f9fdc459d..a48e594818f 100644
--- a/src/rustc/middle/trans/type_use.rs
+++ b/src/rustc/middle/trans/type_use.rs
@@ -243,7 +243,7 @@ fn mark_for_expr(cx: ctx, e: @expr) {
             }
         })
       }
-      expr_alt(_, _, _) | expr_block(_) | expr_if(_, _, _) |
+      expr_match(_, _, _) | expr_block(_) | expr_if(_, _, _) |
       expr_while(_, _) | expr_fail(_) | expr_break | expr_again |
       expr_unary(_, _) | expr_lit(_) | expr_assert(_) |
       expr_mac(_) | expr_addr_of(_, _) |
diff --git a/src/rustc/middle/tstate/pre_post_conditions.rs b/src/rustc/middle/tstate/pre_post_conditions.rs
index 6036db54432..d1942e41fa8 100644
--- a/src/rustc/middle/tstate/pre_post_conditions.rs
+++ b/src/rustc/middle/tstate/pre_post_conditions.rs
@@ -388,7 +388,7 @@ fn find_pre_post_expr(fcx: fn_ctxt, e: @expr) {
                          loop_postcond);
       }
       expr_index(val, sub) { find_pre_post_exprs(fcx, ~[val, sub], e.id); }
-      expr_alt(ex, alts, _) {
+      expr_match(ex, alts, _) {
         find_pre_post_expr(fcx, ex);
         fn do_an_alt(fcx: fn_ctxt, an_alt: arm) -> pre_and_post {
             match an_alt.guard {
diff --git a/src/rustc/middle/tstate/states.rs b/src/rustc/middle/tstate/states.rs
index 9c4191fc20a..f1bc31cbfb2 100644
--- a/src/rustc/middle/tstate/states.rs
+++ b/src/rustc/middle/tstate/states.rs
@@ -443,7 +443,7 @@ fn find_pre_post_state_expr(fcx: fn_ctxt, pres: prestate, e: @expr) -> bool {
       expr_index(val, sub) {
         return find_pre_post_state_two(fcx, pres, val, sub, e.id, oper_pure);
       }
-      expr_alt(val, alts, _) {
+      expr_match(val, alts, _) {
         let mut changed =
             set_prestate_ann(fcx.ccx, e.id, pres) |
                 find_pre_post_state_expr(fcx, pres, val);
diff --git a/src/rustc/middle/typeck/check.rs b/src/rustc/middle/typeck/check.rs
index 1012542c6ad..c9f9e45bb78 100644
--- a/src/rustc/middle/typeck/check.rs
+++ b/src/rustc/middle/typeck/check.rs
@@ -1472,7 +1472,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
         fcx.write_ty(id, ty::mk_nil(tcx));
         bot = !may_break(body);
       }
-      ast::expr_alt(discrim, arms, _) => {
+      ast::expr_match(discrim, arms, _) => {
         bot = alt::check_alt(fcx, expr, discrim, arms);
       }
       ast::expr_fn(proto, decl, body, cap_clause) => {
diff --git a/src/rustc/util/ppaux.rs b/src/rustc/util/ppaux.rs
index 1f180bfb764..b4f04ffab2b 100644
--- a/src/rustc/util/ppaux.rs
+++ b/src/rustc/util/ppaux.rs
@@ -34,7 +34,7 @@ fn explain_region(cx: ctxt, region: ty::region) -> ~str {
           some(ast_map::node_expr(expr)) => {
             match expr.node {
               ast::expr_call(*) => { explain_span(cx, ~"call", expr.span) }
-              ast::expr_alt(*) => { explain_span(cx, ~"alt", expr.span) }
+              ast::expr_match(*) => { explain_span(cx, ~"alt", expr.span) }
               _ => { explain_span(cx, ~"expression", expr.span) }
             }
           }
@@ -106,7 +106,7 @@ fn re_scope_id_to_str(cx: ctxt, node_id: ast::node_id) -> ~str {
             fmt!{"<call at %s>",
                  codemap::span_to_str(expr.span, cx.sess.codemap)}
           }
-          ast::expr_alt(*) => {
+          ast::expr_match(*) => {
             fmt!{"<alt at %s>",
                  codemap::span_to_str(expr.span, cx.sess.codemap)}
           }