Skip to content

Commit a61f107

Browse files
committed
pretty printer: Properly print explicity types for block params
1 parent f2a60a6 commit a61f107

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustsyntax/print/pprust.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,10 @@ fn print_fn_block_args(s: ps, decl: ast::fn_decl) {
13681368
ibox(s, indent_unit);
13691369
print_arg_mode(s, x.mode);
13701370
word(s.s, x.ident);
1371+
if x.ty.node != ast::ty_infer {
1372+
word_space(s, ":");
1373+
print_type(s, x.ty);
1374+
}
13711375
end(s);
13721376
}
13731377
commasep(s, inconsistent, decl.inputs, print_arg);

0 commit comments

Comments
 (0)