From a61f107684c4e5f316d7446c02f58f35b12dbffb Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 23 Apr 2012 10:27:09 +0200 Subject: [PATCH] pretty printer: Properly print explicity types for block params --- src/librustsyntax/print/pprust.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustsyntax/print/pprust.rs b/src/librustsyntax/print/pprust.rs index 2eec0ac8797..d0d21ccd6c4 100644 --- a/src/librustsyntax/print/pprust.rs +++ b/src/librustsyntax/print/pprust.rs @@ -1368,6 +1368,10 @@ fn print_arg(s: ps, x: ast::arg) { ibox(s, indent_unit); print_arg_mode(s, x.mode); word(s.s, x.ident); + if x.ty.node != ast::ty_infer { + word_space(s, ":"); + print_type(s, x.ty); + } end(s); } commasep(s, inconsistent, decl.inputs, print_arg); -- GitLab