diff options
| author | Patrick Walton <[email protected]> | 2011-03-18 11:49:06 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-18 11:49:47 -0700 |
| commit | 2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4 (patch) | |
| tree | 2c558d866e94eb0ee42d9d4c608f75dc4e45a4c8 /src/comp/pretty | |
| parent | Yet more painstaking configure/make logic. (diff) | |
| download | rust-2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4.tar.xz 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.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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); } |