diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-06 18:54:20 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-06 18:55:24 -0700 |
| commit | 60f47eabe2ef2730b98713dee2b5fd59513e8c6c (patch) | |
| tree | cf491427dd1bfac38de4fd93d934702db9669fda /src/libsyntax/print | |
| parent | c0f7ed68e235b61a2e9710864a2283f554bb470d (diff) | |
| download | rust-60f47eabe2ef2730b98713dee2b5fd59513e8c6c.tar.gz rust-60f47eabe2ef2730b98713dee2b5fd59513e8c6c.zip | |
rustc: Parse and stub (broken) typechecking for bounded function types
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 9d7731e8441..b31e63a9f68 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -399,8 +399,8 @@ fn print_type_ex(s: ps, &&ty: @ast::ty, print_colons: bool) { commasep(s, inconsistent, elts, print_type); pclose(s); } - ast::ty_fn(proto, d) => { - print_ty_fn(s, some(proto), d, none, none); + ast::ty_fn(proto, bounds, d) => { + print_ty_fn(s, some(proto), bounds, d, none, none); } ast::ty_path(path, _) => print_path(s, path, print_colons), ast::ty_fixed_length(t, v) => { @@ -702,7 +702,7 @@ fn print_ty_method(s: ps, m: ast::ty_method) { hardbreak_if_not_bol(s); maybe_print_comment(s, m.span.lo); print_outer_attributes(s, m.attrs); - print_ty_fn(s, none, m.decl, some(m.ident), some(m.tps)); + print_ty_fn(s, none, @~[], m.decl, some(m.ident), some(m.tps)); word(s.s, ~";"); } @@ -1645,10 +1645,12 @@ fn print_arg(s: ps, input: ast::arg) { } fn print_ty_fn(s: ps, opt_proto: option<ast::proto>, + bounds: @~[ast::ty_param_bound], decl: ast::fn_decl, id: option<ast::ident>, tps: option<~[ast::ty_param]>) { ibox(s, indent_unit); word(s.s, opt_proto_to_str(opt_proto)); + print_bounds(s, bounds); match id { some(id) => { word(s.s, ~" "); word(s.s, *id); } _ => () } match tps { some(tps) => print_type_params(s, tps), _ => () } zerobreak(s.s); |
