diff options
| author | Patrick Walton <[email protected]> | 2010-11-24 16:52:49 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-11-24 16:52:49 -0800 |
| commit | c1916adc7e16bd7ecd3ca8dbbe985ec75d0c825a (patch) | |
| tree | d69d2e25a0a016c8c798d9a416b628d9f907a2d1 /src/comp/middle/trans.rs | |
| parent | rustc: Don't require a semicolon after an "alt" statement (diff) | |
| download | rust-c1916adc7e16bd7ecd3ca8dbbe985ec75d0c825a.tar.xz rust-c1916adc7e16bd7ecd3ca8dbbe985ec75d0c825a.zip | |
rustc: Parse type-parametric functions
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index f7ee82f6..1972a434 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1295,7 +1295,7 @@ impure fn trans_fn(@crate_ctxt cx, &ast._fn f, ast.def_id fid) { impure fn trans_item(@crate_ctxt cx, &ast.item item) { alt (item.node) { - case (ast.item_fn(?name, ?f, ?fid, _)) { + case (ast.item_fn(?name, ?f, _, ?fid, _)) { auto sub_cx = @rec(path=cx.path + "." + name with *cx); trans_fn(sub_cx, f, fid); } @@ -1315,7 +1315,8 @@ impure fn trans_mod(@crate_ctxt cx, &ast._mod m) { fn collect_item(&@crate_ctxt cx, @ast.item i) -> @crate_ctxt { alt (i.node) { - case (ast.item_fn(?name, ?f, ?fid, ?ann)) { + case (ast.item_fn(?name, ?f, _, ?fid, ?ann)) { + // TODO: type-params cx.items.insert(fid, i); auto llty = node_type(cx, ann); let str s = cx.names.next("_rust_fn") + "." + name; |