aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-12-10 16:44:12 -0800
committerPatrick Walton <[email protected]>2010-12-10 16:44:12 -0800
commit0b84707da777a5caa58f7bdda4e1929e8a900404 (patch)
treea3aece071f1bd578385b1daa8b7f3ccb9e0d60a5 /src/comp
parentrustc: Add LLVM typedefs for rust_crate and rust_task for good measure (diff)
downloadrust-0b84707da777a5caa58f7bdda4e1929e8a900404.tar.xz
rust-0b84707da777a5caa58f7bdda4e1929e8a900404.zip
rustc: Add tag support to ty_of_item in typeck
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/typeck.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs
index 0380437f..1ec4fe25 100644
--- a/src/comp/middle/typeck.rs
+++ b/src/comp/middle/typeck.rs
@@ -409,6 +409,10 @@ fn collect_item_types(@ast.crate crate) -> tup(@ast.crate, @ty_table) {
ret ty_;
}
+ case (ast.item_tag(_, _, _, ?def_id)) {
+ item_to_ty.insert(def_id, plain_ty(ty_tag(def_id)));
+ }
+
case (ast.item_mod(_, _, _)) { fail; }
}
}