aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/ty.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-31 19:12:40 -0700
committerPatrick Walton <[email protected]>2011-03-31 19:12:40 -0700
commitc66edca83d04c5be5c27629b43c2c180a67f2d63 (patch)
tree37db28b65567fd8c067c82d1917878181a69c0f5 /src/comp/middle/ty.rs
parentrustc: Make tag_ty_params() and substitute_ty_params() take def ids instead o... (diff)
downloadrust-c66edca83d04c5be5c27629b43c2c180a67f2d63.tar.xz
rust-c66edca83d04c5be5c27629b43c2c180a67f2d63.zip
rustc: Add a type annotation to tag items
Diffstat (limited to 'src/comp/middle/ty.rs')
-rw-r--r--src/comp/middle/ty.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index 00d4b0b3..829a5e5f 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -706,14 +706,9 @@ fn item_ty(@ast.item it) -> ty_params_and_ty {
ty_params = tps;
result_ty = ann_to_type(ann);
}
- case (ast.item_tag(_, _, ?tps, ?did)) {
- // Create a new generic polytype.
+ case (ast.item_tag(_, _, ?tps, ?did, ?ann)) {
ty_params = tps;
- let vec[@t] subtys = vec();
- for (ast.ty_param tp in tps) {
- subtys += vec(plain_ty(ty_param(tp.id)));
- }
- result_ty = plain_ty(ty_tag(did, subtys));
+ result_ty = ann_to_type(ann);
}
case (ast.item_obj(_, _, ?tps, _, ?ann)) {
ty_params = tps;