From 60acae4df725f2e275e01d7b59cc7ecacefb5f2c Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 19 Dec 2011 10:21:31 +0100 Subject: Add type argument field to expr_path This way, you can explicitly provide type parameters when calling a generic method. Issue #1227 --- src/comp/syntax/print/pprust.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/comp/syntax/print/pprust.rs') diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 9b3d047d435..92a5d228c26 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -879,7 +879,7 @@ fn print_expr(s: ps, &&expr: @ast::expr) { word_space(s, "="); print_expr(s, rhs); } - ast::expr_field(expr, id) { + ast::expr_field(expr, id, tys) { // Deal with '10.x' if ends_in_lit_int(expr) { popen(s); print_expr(s, expr); pclose(s); @@ -888,6 +888,11 @@ fn print_expr(s: ps, &&expr: @ast::expr) { } word(s.s, "."); word(s.s, id); + if vec::len(tys) > 0u { + word(s.s, "::<"); + commasep(s, inconsistent, tys, print_type); + word(s.s, ">"); + } } ast::expr_index(expr, index) { print_expr_parens_if_not_bot(s, expr); -- cgit 1.4.1-3-g733a5