diff options
| author | Patrick Walton <[email protected]> | 2011-03-31 19:12:40 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-31 19:12:40 -0700 |
| commit | c66edca83d04c5be5c27629b43c2c180a67f2d63 (patch) | |
| tree | 37db28b65567fd8c067c82d1917878181a69c0f5 /src/comp/middle/ty.rs | |
| parent | rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead o... (diff) | |
| download | rust-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.rs | 9 |
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; |