diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-03-19 17:27:06 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-03-19 17:28:00 -0700 |
| commit | b12588a197bcba39a170d78ff02a2b4f8f73ae3d (patch) | |
| tree | e2d1f66545578c5df01bb453feb893bce2a1d60c /src/rustc | |
| parent | 4e3e13302dfc32dbc347319ec1d2f2c40108f0fc (diff) | |
| download | rust-b12588a197bcba39a170d78ff02a2b4f8f73ae3d.tar.gz rust-b12588a197bcba39a170d78ff02a2b4f8f73ae3d.zip | |
rustc: Fix mutability checking when dereferencing a region-annotated pointer
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/middle/mutbl.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/rustc/middle/mutbl.rs b/src/rustc/middle/mutbl.rs index aacb1a96f2e..28893c33db4 100644 --- a/src/rustc/middle/mutbl.rs +++ b/src/rustc/middle/mutbl.rs @@ -18,13 +18,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) -> let ds = [], t = t; loop { alt ty::get(t).struct { - ty::ty_box(mt) { - ds += [@{mutbl: mt.mutbl == m_mutbl, - kind: unbox(false), - outer_t: t}]; - t = mt.ty; - } - ty::ty_uniq(mt) { + ty::ty_box(mt) | ty::ty_uniq(mt) | ty::ty_rptr(_, mt) { ds += [@{mutbl: mt.mutbl == m_mutbl, kind: unbox(false), outer_t: t}]; |
