From c66edca83d04c5be5c27629b43c2c180a67f2d63 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 31 Mar 2011 19:12:40 -0700 Subject: rustc: Add a type annotation to tag items --- src/comp/middle/ty.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/comp/middle/ty.rs') 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; -- cgit v1.2.3