parent
1b3023e4d0
commit
ea67099234
2 changed files with 6 additions and 1 deletions
|
@ -86,7 +86,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
|
||||||
let mut = false;
|
let mut = false;
|
||||||
alt ty::struct(tcx, base_t) {
|
alt ty::struct(tcx, base_t) {
|
||||||
ty::ty_box(mt) { mut = mt.mut != imm; }
|
ty::ty_box(mt) { mut = mt.mut != imm; }
|
||||||
ty::ty_uniq(_) { }
|
ty::ty_uniq(mt) { mut = mt.mut != imm; }
|
||||||
ty::ty_res(_, _, _) { }
|
ty::ty_res(_, _, _) { }
|
||||||
ty::ty_tag(_, _) { }
|
ty::ty_tag(_, _) { }
|
||||||
ty::ty_ptr(mt) { mut = mt.mut != imm; }
|
ty::ty_ptr(mt) { mut = mt.mut != imm; }
|
||||||
|
|
5
src/test/run-pass/unique-mutable.rs
Normal file
5
src/test/run-pass/unique-mutable.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
fn main() {
|
||||||
|
let i = ~mutable 0;
|
||||||
|
*i = 1;
|
||||||
|
assert *i == 1;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue