rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.
This commit is contained in:
parent
4c2245d842
commit
2ef9c01ffc
6 changed files with 87 additions and 25 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue