aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-10-08 12:26:34 -0700
committerPatrick Walton <[email protected]>2010-10-08 12:26:34 -0700
commite3758fe321725bec4707e1b7d4fff333ba915905 (patch)
tree4d9c60203378443b34cdce5fff0b9783d674b46d /src/comp/middle
parentAdd a little code to resolve, to check that the fold interface works. (diff)
downloadrust-e3758fe321725bec4707e1b7d4fff333ba915905.tar.xz
rust-e3758fe321725bec4707e1b7d4fff333ba915905.zip
rustc: Make functions output a type, not a slot
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/fold.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/middle/fold.rs b/src/comp/middle/fold.rs
index 6f4b369e..a74ac3b3 100644
--- a/src/comp/middle/fold.rs
+++ b/src/comp/middle/fold.rs
@@ -120,7 +120,7 @@ type ast_fold[ENV] =
vec[@stmt] stmts) -> block) fold_block,
(fn(&ENV e, vec[ast.input] inputs,
- &slot output, block body) -> ast._fn) fold_fn,
+ &ty output, block body) -> ast._fn) fold_fn,
(fn(&ENV e, &ast._mod m) -> ast._mod) fold_mod,
@@ -310,10 +310,10 @@ fn fold_fn[ENV](&ENV env, ast_fold[ENV] fld, &ast._fn f) -> ast._fn {
let operator[ast.input,ast.input] fi = bind fold_input[ENV](env, fld, _);
auto inputs = _vec.map[ast.input, ast.input](fi, f.inputs);
- auto output = fold_slot[ENV](env, fld, f.output);
+ auto output = fold_ty[ENV](env, fld, @f.output);
auto body = fold_block[ENV](env, fld, f.body);
- ret fld.fold_fn(env, inputs, output, body);
+ ret fld.fold_fn(env, inputs, *output, body);
}
fn fold_item[ENV](&ENV env, ast_fold[ENV] fld, @item i) -> @item {
@@ -539,7 +539,7 @@ fn identity_fold_block[ENV](&ENV e, &span sp, vec[@stmt] stmts) -> block {
fn identity_fold_fn[ENV](&ENV e,
vec[ast.input] inputs,
- &slot output,
+ &ast.ty output,
block body) -> ast._fn {
ret rec(inputs=inputs, output=output, body=body);
}