From 2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 18 Mar 2011 11:49:06 -0700 Subject: rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now. --- src/comp/pretty/pprust.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/comp/pretty') diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index f2e52d72..6f5ea096 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -58,8 +58,10 @@ impure fn commasep[IN](ps s, vec[IN] elts, impure fn (ps, &IN) op) { } impure fn print_mt(ps s, &ast.mt mt) { - if (mt.mut == ast.mut) { - wrd1(s, "mutable"); + alt (mt.mut) { + case (ast.mut) { wrd1(s, "mutable"); } + case (ast.maybe_mut) { wrd1(s, "mutable?"); } + case (ast.imm) { /* nothing */ } } print_type(s, mt.ty); } -- cgit v1.2.3