aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/trans.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-11-10 18:19:27 -0800
committerPatrick Walton <[email protected]>2010-11-10 18:20:02 -0800
commitc3bc88a3251bc966eb128edbf4803e0a88cc06ff (patch)
tree174f0f7120b059ddec4de355e2e179a8c4aab152 /src/comp/middle/trans.rs
parentRedo the scheme for block context chaining and termination, to simplify and s... (diff)
downloadrust-c3bc88a3251bc966eb128edbf4803e0a88cc06ff.tar.xz
rust-c3bc88a3251bc966eb128edbf4803e0a88cc06ff.zip
rustc: Add an annotation to function and type items so that the typechecker can store types with them
Diffstat (limited to 'src/comp/middle/trans.rs')
-rw-r--r--src/comp/middle/trans.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index d2afa467..bd1836b5 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -914,7 +914,7 @@ impure fn trans_expr(@block_ctxt cx, &ast.expr e) -> result {
// perhaps to pick a more tasteful one.
auto outptr = cx.fcx.lloutptr;
alt (cx.fcx.tcx.items.get(f_res._2).node) {
- case (ast.item_fn(_, ?ff, _)) {
+ case (ast.item_fn(_, ?ff, _, _)) {
outptr = cx.build.Alloca(type_of(cx.fcx.tcx, ff.output));
}
}
@@ -1182,7 +1182,7 @@ impure fn trans_fn(@trans_ctxt cx, &ast._fn f, ast.def_id fid) {
impure fn trans_item(@trans_ctxt cx, &ast.item item) {
alt (item.node) {
- case (ast.item_fn(?name, ?f, ?fid)) {
+ case (ast.item_fn(?name, ?f, ?fid, _)) {
auto sub_cx = @rec(path=cx.path + "." + name with *cx);
trans_fn(sub_cx, f, fid);
}
@@ -1202,7 +1202,7 @@ impure fn trans_mod(@trans_ctxt cx, &ast._mod m) {
fn collect_item(&@trans_ctxt cx, @ast.item i) -> @trans_ctxt {
alt (i.node) {
- case (ast.item_fn(?name, ?f, ?fid)) {
+ case (ast.item_fn(?name, ?f, ?fid, _)) {
cx.items.insert(fid, i);
let vec[TypeRef] args =
vec(T_ptr(type_of(cx, f.output)), // outptr.