Skip to content

Commit 0e5f76a

Browse files
committed
Fix ty_uniq case in maybe_auto_unbox
Closes #961 Issue #409
1 parent 1a48023 commit 0e5f76a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/comp/middle/mut.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
2424
}
2525
ty::ty_uniq(mt) {
2626
ds += [@{mut: mt.mut != imm, kind: unbox, outer_t: t}];
27+
t = mt.ty;
2728
}
2829
ty::ty_res(_, inner, tps) {
2930
ds += [@{mut: false, kind: unbox, outer_t: t}];
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Issue #961
2+
3+
fn altsimple() {
4+
alt ~true {
5+
_ { }
6+
}
7+
}
8+
fn main() { }

0 commit comments

Comments
 (0)