From bb594a03a14d872f6b190c644ecccfa41792cb30 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 18 May 2011 16:15:38 -0700 Subject: [PATCH] remove now-unused ts field from ann --- src/comp/front/ast.rs | 3 +-- src/comp/front/parser.rs | 5 ++--- src/comp/middle/ty.rs | 2 +- src/comp/util/common.rs | 15 ++------------- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 6bde1e42feee..75321f595f44 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -23,8 +23,7 @@ type ty_param = ident; // Annotations added during successive passes. type ann = rec(uint id, middle::ty::t ty, - option::t[vec[middle::ty::t]] tps, - option::t[@ts_ann] ts); + option::t[vec[middle::ty::t]] tps); tag def { def_fn(def_id); diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index df08e4c8d740..3099ddfb0aee 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -147,11 +147,10 @@ fn new_parser(session::session sess, fn get_chpos() -> uint {ret rdr.get_chpos();} fn get_ann() -> ast::ann { - // TODO: Remove ty, tps, and ts. ty and tps should be unused + // TODO: Remove ty and tps, which should be unused // by now. auto rv = rec(id=next_ann_var, ty=0u, - tps=none[vec[middle::ty::t]], - ts=none[@middle::tstate::ann::ts_ann]); + tps=none[vec[middle::ty::t]]); next_ann_var += 1u; ret rv; } diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index 65d603895a3f..094af6d910ff 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -1498,7 +1498,7 @@ fn ann_to_monotype(ctxt cx, &node_type_table ntt, ast::ann a) -> t { // Turns a type and optional type parameters into an annotation, using // defaults for other fields. fn mk_ann_type(uint node_id, t typ, option::t[vec[t]] tps) -> ast::ann { - ret rec(id=node_id, ty=typ, tps=tps, ts=none[@ts_ann]); + ret rec(id=node_id, ty=typ, tps=tps); } // Turns a type into an annotation, using defaults for other fields. diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs index 8d62e27f5bc6..090ad57027ec 100644 --- a/src/comp/util/common.rs +++ b/src/comp/util/common.rs @@ -178,8 +178,8 @@ fn item_to_str(&@ast::item i) -> str { auto out_ = mkstate(s.get_writer(), 80u); auto out = @rec(s=out_, comments=none[vec[front::lexer::cmnt]], - mutable cur_cmnt=0u); - + mutable cur_cmnt=0u, + mode=mo_untyped); print_item(out, i); ret s.get_str(); } @@ -196,17 +196,6 @@ fn log_item_err(&@ast::item i) -> () { log_err(item_to_str(i)); } -fn log_ann(&ast::ann a) -> () { - alt (a) { - case (ast::ann_none(_)) { - log("ann_none"); - } - case (ast::ann_type(_,_,_,_)) { - log("ann_type"); - } - } -} - fn fun_to_str(&ast::_fn f, str name, vec[ast::ty_param] params) -> str { let str_writer s = string_writer(); auto out_ = mkstate(s.get_writer(), 80u);