about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-05-17 19:13:16 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-05-17 19:13:16 -0700
commit87288a186d1753b25378e94b3626fe8009e92fde (patch)
treedde5b53eda95fc3a578b307b47d9b352c9f20801 /src/comp
parentd21741843c4c4af2d6fed4fc1d9824fbfd960579 (diff)
downloadrust-87288a186d1753b25378e94b3626fe8009e92fde.tar.gz
rust-87288a186d1753b25378e94b3626fe8009e92fde.zip
rustc: Make check_const() not rebuild the AST (although it's not called at the moment!)
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/typeck.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index c1851ff1563..ce39632e1ef 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -2662,7 +2662,7 @@ fn check_block(&@fn_ctxt fcx, &ast::block block) {
 }
 
 fn check_const(&@crate_ctxt ccx, &span sp, &ast::ident ident, &@ast::ty t,
-               &@ast::expr e, &ast::def_id id, &ast::ann ann) -> @ast::item {
+               &@ast::expr e, &ast::def_id id, &ast::ann ann) {
     // FIXME: this is kinda a kludge; we manufacture a fake "function context"
     // for checking the initializer expression.
     auto rty = ann_to_type(ccx.node_types, ann);
@@ -2671,10 +2671,7 @@ fn check_const(&@crate_ctxt ccx, &span sp, &ast::ident ident, &@ast::ty t,
                             locals = @common::new_def_hash[ty::t](),
                             ccx = ccx);
     check_expr(fcx, e);
-    // FIXME: necessary? Correct sequence?
     Pushdown::pushdown_expr(fcx, rty, e);
-    auto item = ast::item_const(ident, t, e, id, ann);
-    ret @fold::respan[ast::item_](sp, item);
 }
 
 fn check_fn(&@crate_ctxt ccx, &ast::fn_decl decl, ast::proto proto,