Make return-by-ref function headers pretty-print safely

Closes #972
This commit is contained in:
Marijn Haverbeke 2011-09-26 04:11:35 +02:00
parent 1e988f228d
commit 8911aef798

View file

@ -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));
}
}
_ {}