From 8911aef798ef41dd56e1cc0fb777747476cf3443 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 26 Sep 2011 04:11:35 +0200 Subject: [PATCH] Make return-by-ref function headers pretty-print safely Closes #972 --- src/comp/syntax/print/pprust.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 8b1fa025cac0..129d00f0f886 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -1149,7 +1149,7 @@ fn print_fn_args_and_ret(s: ps, decl: ast::fn_decl, constrs: [@ast::constr]) { ast::return_ref(mut, arg) { word(s.s, mut ? "&!" : "&"); if vec::len(decl.inputs) > 1u { - word(s.s, std::uint::str(arg)); + word_space(s, std::uint::str(arg)); } } _ {}