Skip to content

Commit 83ddb55

Browse files
committed
syntax: Pretty-print mut qualifiers on args
1 parent a7eaa1f commit 83ddb55

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libsyntax/print/pprust.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ fn print_fn_args(s: ps, decl: ast::fn_decl,
17161716
// It is unfortunate to duplicate the commasep logic, but we
17171717
// we want the self type, the args, and the capture clauses all
17181718
// in the same box.
1719-
box(s, 0u, inconsistent);
1719+
box(s, 0, inconsistent);
17201720
let mut first = true;
17211721
for opt_self_ty.each |self_ty| {
17221722
first = !print_self_ty(s, *self_ty);
@@ -1913,6 +1913,9 @@ fn print_mt(s: ps, mt: ast::mt) {
19131913
fn print_arg(s: ps, input: ast::arg) {
19141914
ibox(s, indent_unit);
19151915
print_arg_mode(s, input.mode);
1916+
if input.is_mutbl {
1917+
word_space(s, ~"mut");
1918+
}
19161919
match input.ty.node {
19171920
ast::ty_infer => print_irrefutable_pat(s, input.pat),
19181921
_ => {

0 commit comments

Comments
 (0)