about summary refs log tree commit diff
path: root/src/rustc/front
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-03-12 16:26:31 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-03-12 17:34:37 -0700
commitdd610a151bfde75e496d5bbaef95b63bd52bb822 (patch)
treea09b746e4a58d04bc0641f1a7fc3a7e88c2724e7 /src/rustc/front
parentd60813146d883d2b364817c2e5b6fd538b4b7819 (diff)
downloadrust-dd610a151bfde75e496d5bbaef95b63bd52bb822.tar.gz
rust-dd610a151bfde75e496d5bbaef95b63bd52bb822.zip
rustc: Add node IDs to AST types so we can associate them with region environments
Diffstat (limited to 'src/rustc/front')
-rw-r--r--src/rustc/front/test.rs22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/rustc/front/test.rs b/src/rustc/front/test.rs
index 47cd3328755..ecc4f678fba 100644
--- a/src/rustc/front/test.rs
+++ b/src/rustc/front/test.rs
@@ -254,11 +254,15 @@ fn mk_test_desc_vec_ty(cx: test_ctxt) -> @ast::ty {
                  types: []});
 
     let test_desc_ty: ast::ty =
-        nospan(ast::ty_path(test_desc_ty_path, cx.sess.next_node_id()));
+        {id: cx.sess.next_node_id(),
+         node: ast::ty_path(test_desc_ty_path, cx.sess.next_node_id()),
+         span: dummy_sp()};
 
     let vec_mt: ast::mt = {ty: @test_desc_ty, mutbl: ast::m_imm};
 
-    ret @nospan(ast::ty_vec(vec_mt));
+    ret @{id: cx.sess.next_node_id(),
+          node: ast::ty_vec(vec_mt),
+          span: dummy_sp()};
 }
 
 fn mk_test_desc_vec(cx: test_ctxt) -> @ast::expr {
@@ -346,7 +350,7 @@ fn mk_test_wrapper(cx: test_ctxt,
 
     let wrapper_decl: ast::fn_decl = {
         inputs: [],
-        output: @nospan(ast::ty_nil),
+        output: @{id: cx.sess.next_node_id(), node: ast::ty_nil, span: span},
         purity: ast::impure_fn,
         cf: ast::return_val,
         constraints: []
@@ -377,9 +381,13 @@ fn mk_test_wrapper(cx: test_ctxt,
 
 fn mk_main(cx: test_ctxt) -> @ast::item {
     let str_pt = @nospan({global: false, idents: ["str"], types: []});
-    let str_ty = @nospan(ast::ty_path(str_pt, cx.sess.next_node_id()));
+    let str_ty = @{id: cx.sess.next_node_id(),
+                   node: ast::ty_path(str_pt, cx.sess.next_node_id()),
+                   span: dummy_sp()};
     let args_mt: ast::mt = {ty: str_ty, mutbl: ast::m_imm};
-    let args_ty: ast::ty = nospan(ast::ty_vec(args_mt));
+    let args_ty: ast::ty = {id: cx.sess.next_node_id(),
+                            node: ast::ty_vec(args_mt),
+                            span: dummy_sp()};
 
     let args_arg: ast::arg =
         {mode: ast::expl(ast::by_val),
@@ -387,7 +395,9 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
          ident: "args",
          id: cx.sess.next_node_id()};
 
-    let ret_ty = nospan(ast::ty_nil);
+    let ret_ty = {id: cx.sess.next_node_id(),
+                  node: ast::ty_nil,
+                  span: dummy_sp()};
 
     let decl: ast::fn_decl =
         {inputs: [args_arg],