diff options
| author | Patrick Walton <[email protected]> | 2011-04-12 15:09:50 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-04-12 15:10:40 -0700 |
| commit | de0175abed80b13d8d8528002fe637d8c9687c93 (patch) | |
| tree | 88fe8e28d5cc64c174233c0986ddc4734f2280e1 /src/comp/front/ast.rs | |
| parent | rustc: Add "float" as a type to the pretty printer (diff) | |
| download | rust-de0175abed80b13d8d8528002fe637d8c9687c93.tar.xz rust-de0175abed80b13d8d8528002fe637d8c9687c93.zip | |
rustc: Switch to indices for type parameters
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 50517f00..dfc69695 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -17,7 +17,7 @@ type crate_num = int; type def_num = int; type def_id = tup(crate_num, def_num); -type ty_param = rec(ident ident, def_id id); +type ty_param = ident; // Annotations added during successive passes. tag ann { @@ -39,7 +39,7 @@ tag def { def_upvar(def_id); def_variant(def_id /* tag */, def_id /* variant */); def_ty(def_id); - def_ty_arg(def_id); + def_ty_arg(uint); def_binding(def_id); def_use(def_id); def_native_ty(def_id); @@ -59,7 +59,7 @@ fn def_id_of_def(def d) -> def_id { case (def_upvar(?id)) { ret id; } case (def_variant(_, ?id)) { ret id; } case (def_ty(?id)) { ret id; } - case (def_ty_arg(?id)) { ret id; } + case (def_ty_arg(_)) { fail; } case (def_binding(?id)) { ret id; } case (def_use(?id)) { ret id; } case (def_native_ty(?id)) { ret id; } |