diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-02 21:26:54 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-03 10:55:59 -0700 |
| commit | 0b7a94a94c15546016a2c85329bfa16f5a39628a (patch) | |
| tree | 78a18f050f458250faa0d27d36413b21543b0395 /src/comp/syntax | |
| parent | 843767a841d49ce3c5005b9fd2705217af22d5d5 (diff) | |
Pretty-print kinds of type params
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index f342e0e26a8..e99414d98a5 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -1195,10 +1195,19 @@ fn print_alias(s: &ps, m: ast::mode) { } } +fn print_kind(s: &ps, kind: ast::kind) { + alt kind { + ast::kind_unique. { word(s.s, "~"); } + ast::kind_shared. { word(s.s, "@"); } + _ { /* fallthrough */ } + } +} + fn print_type_params(s: &ps, params: &ast::ty_param[]) { if ivec::len(params) > 0u { word(s.s, "["); fn printParam(s: &ps, param: &ast::ty_param) { + print_kind(s, param.kind); word(s.s, param.ident); } commasep(s, inconsistent, params, printParam); |
