diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-07-20 19:06:32 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-07-25 12:12:25 -0700 |
| commit | d74fb9875bc01a96359127837c5f2b71de7af93a (patch) | |
| tree | 803903b90dde0498715a460bbb0683e8f62259fe /src/libsyntax/ext | |
| parent | f65d6026ef84d16e5b27ab4c852df46044091e2d (diff) | |
| download | rust-d74fb9875bc01a96359127837c5f2b71de7af93a.tar.gz rust-d74fb9875bc01a96359127837c5f2b71de7af93a.zip | |
Refactoring pipes to allow implementing bounded protocols.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index df5df748a74..70423f5437c 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -51,10 +51,12 @@ impl compile of gen_send for message { |n, t| cx.arg_mode(n, t, ast::by_copy) ); + let pipe_ty = cx.ty_path_ast_builder( + path(this.data_name()) + .add_tys(cx.ty_vars(this.ty_params))); let args_ast = vec::append( ~[cx.arg_mode(@~"pipe", - cx.ty_path_ast_builder(path(this.data_name()) - .add_tys(cx.ty_vars(this.ty_params))), + pipe_ty, ast::by_copy)], args_ast); @@ -73,6 +75,7 @@ impl compile of gen_send for message { .map(|x| *x), ~", ")); body += #fmt("pipes::send(pipe, message);\n"); + // return the new channel body += ~"c }"; let body = cx.parse_expr(body); |
