rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.

This commit is contained in:
Patrick Walton 2011-03-18 11:49:06 -07:00
parent 4c2245d842
commit 2ef9c01ffc
6 changed files with 87 additions and 25 deletions

View file

@ -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);
}