about summary refs log tree commit diff
path: root/src/comp/pretty
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-03-18 11:49:06 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-03-18 11:49:47 -0700
commit2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4 (patch)
tree2c558d866e94eb0ee42d9d4c608f75dc4e45a4c8 /src/comp/pretty
parent4c2245d8421ff43832b005375025cd14f56c1ca9 (diff)
downloadrust-2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4.tar.gz
rust-2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4.zip
rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.
Diffstat (limited to 'src/comp/pretty')
-rw-r--r--src/comp/pretty/pprust.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs
index f2e52d72178..6f5ea096b05 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);
 }