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 maybe_auto_unbox(tcx: ty::ctxt, t: ty::t) -> {t: ty::t, ds: [deref]} {
}
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() { }