Add support for mutable unique boxes

Issue #409
This commit is contained in:
Brian Anderson 2011-09-21 22:17:06 -07:00
parent 1b3023e4d0
commit ea67099234
2 changed files with 6 additions and 1 deletions

View File

@ -86,7 +86,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
let mut = false;
alt ty::struct(tcx, base_t) {
ty::ty_box(mt) { mut = mt.mut != imm; }
ty::ty_uniq(_) { }
ty::ty_uniq(mt) { mut = mt.mut != imm; }
ty::ty_res(_, _, _) { }
ty::ty_tag(_, _) { }
ty::ty_ptr(mt) { mut = mt.mut != imm; }

View File

@ -0,0 +1,5 @@
fn main() {
let i = ~mutable 0;
*i = 1;
assert *i == 1;
}