Fix ty_uniq case in maybe_auto_unbox

Closes #961
Issue #409
This commit is contained in:
Brian Anderson 2011-09-22 18:14:18 -07:00
parent 1a48023a79
commit 0e5f76a718
2 changed files with 9 additions and 0 deletions

View file

@ -24,6 +24,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
}
ty::ty_uniq(mt) {
ds += [@{mut: mt.mut != imm, kind: unbox, outer_t: t}];
t = mt.ty;
}
ty::ty_res(_, inner, tps) {
ds += [@{mut: false, kind: unbox, outer_t: t}];

View file

@ -0,0 +1,8 @@
// Issue #961
fn altsimple() {
alt ~true {
_ { }
}
}
fn main() { }