From b12588a197bcba39a170d78ff02a2b4f8f73ae3d Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 19 Mar 2012 17:27:06 -0700 Subject: rustc: Fix mutability checking when dereferencing a region-annotated pointer --- src/rustc/middle/mutbl.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/rustc') 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}]; -- cgit 1.4.1-3-g733a5