Skip to content

Commit 235896a

Browse files
committed
---
yaml --- r: 4184 b: refs/heads/master c: 0186176 h: refs/heads/master v: v3
1 parent f81206d commit 235896a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a4cf804671761f05445d71510a730563f07fde84
2+
refs/heads/master: 0186176ae989cc5ccce1cf90322c567eee084dbf

trunk/src/comp/syntax/print/pprust.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,11 @@ fn print_type(s: &ps, ty: &ast::ty) {
286286
print_type(s, *mt.ty);
287287
if parens { pclose(s); }
288288
word(s.s, "[");
289-
print_mutability(s, mt.mut);
289+
alt mt.mut {
290+
ast::mut. { word(s.s, "mutable"); }
291+
ast::maybe_mut. { word(s.s, "mutable?"); }
292+
ast::imm. {}
293+
}
290294
word(s.s, "]");
291295
}
292296
ast::ty_ptr(mt) { word(s.s, "*"); print_mt(s, mt); }
@@ -673,7 +677,10 @@ fn print_expr(s: &ps, expr: &@ast::expr) {
673677
ast::sk_rc. { word(s.s, "["); }
674678
ast::sk_unique. { word(s.s, "~["); }
675679
}
676-
if mut == ast::mut { word_nbsp(s, "mutable"); }
680+
if mut == ast::mut {
681+
word(s.s, "mutable");
682+
if ivec::len(exprs) > 0u { nbsp(s); }
683+
}
677684
commasep_exprs(s, inconsistent, exprs);
678685
word(s.s, "]");
679686
end(s);

0 commit comments

Comments
 (0)