about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-25 14:15:54 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-25 14:15:54 -0700
commit608f7ccded67fd65d5e12ef2c0601170fb3345ed (patch)
treeb36c1d24d57ec9c020c11d602f3b77521017515b /src/comp
parent4d92cb5c63469003903a87574e30308f512314cc (diff)
downloadrust-608f7ccded67fd65d5e12ef2c0601170fb3345ed.tar.gz
rust-608f7ccded67fd65d5e12ef2c0601170fb3345ed.zip
Move ast::pat_id_map to ast::util
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans_alt.rs4
-rw-r--r--src/comp/middle/typeck.rs2
-rw-r--r--src/comp/syntax/ast.rs2
-rw-r--r--src/comp/syntax/ast_util.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/comp/middle/trans_alt.rs b/src/comp/middle/trans_alt.rs
index c391c6b4baa..5f99f921312 100644
--- a/src/comp/middle/trans_alt.rs
+++ b/src/comp/middle/trans_alt.rs
@@ -69,7 +69,7 @@ type match_branch =
       bound: bind_map,
       data: @{body: BasicBlockRef,
               guard: option::t<@ast::expr>,
-              id_map: ast::pat_id_map}};
+              id_map: ast_util::pat_id_map}};
 type match = [match_branch];
 
 fn matches_always(p: &@ast::pat) -> bool {
@@ -464,7 +464,7 @@ fn compile_submatch(bcx: @block_ctxt, m: &match, vals: [ValueRef],
 
 // Returns false for unreachable blocks
 fn make_phi_bindings(bcx: &@block_ctxt, map: &[exit_node],
-                     ids: &ast::pat_id_map) -> bool {
+                     ids: &ast_util::pat_id_map) -> bool {
     let our_block = bcx.llbb as uint;
     let success = true;
     for each item: @{key: ast::ident, val: ast::node_id} in ids.items() {
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 859e169b44f..f282c63861f 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -1305,7 +1305,7 @@ fn check_lit(ccx: @crate_ctxt, lit: &@ast::lit) -> ty::t {
 
 // Pattern checking is top-down rather than bottom-up so that bindings get
 // their types immediately.
-fn check_pat(fcx: &@fn_ctxt, map: &ast::pat_id_map, pat: &@ast::pat,
+fn check_pat(fcx: &@fn_ctxt, map: &ast_util::pat_id_map, pat: &@ast::pat,
              expected: ty::t) {
     alt pat.node {
       ast::pat_wild. { write::ty_only_fixup(fcx, pat.id, expected); }
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs
index d452ffe4a6d..4caddb5e25b 100644
--- a/src/comp/syntax/ast.rs
+++ b/src/comp/syntax/ast.rs
@@ -98,8 +98,6 @@ tag pat_ {
     pat_box(@pat);
 }
 
-type pat_id_map = std::map::hashmap<str, ast::node_id>;
-
 tag mutability { mut; imm; maybe_mut; }
 
 tag kind { kind_pinned; kind_shared; kind_unique; }
diff --git a/src/comp/syntax/ast_util.rs b/src/comp/syntax/ast_util.rs
index e89889fa027..74c3d6dac49 100644
--- a/src/comp/syntax/ast_util.rs
+++ b/src/comp/syntax/ast_util.rs
@@ -43,6 +43,8 @@ fn def_id_of_def(d: def) -> def_id {
     }
 }
 
+type pat_id_map = std::map::hashmap<str, ast::node_id>;
+
 // This is used because same-named variables in alternative patterns need to
 // use the node_id of their namesake in the first pattern.
 fn pat_id_map(pat: &@pat) -> pat_id_map {