From 1a64153b244183f215241e8c8c2c115076239ba3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 17 Oct 2011 16:29:26 -0700 Subject: [PATCH] Correct two more analyses of mutable? as mutable I can't come up with test cases but this seems correct. --- src/comp/middle/mut.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comp/middle/mut.rs b/src/comp/middle/mut.rs index 7ba13f3e7c20..9dfddd2ae977 100644 --- a/src/comp/middle/mut.rs +++ b/src/comp/middle/mut.rs @@ -19,11 +19,11 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) -> while true { alt ty::struct(tcx, t) { ty::ty_box(mt) { - ds += [@{mut: mt.mut != imm, kind: unbox, outer_t: t}]; + ds += [@{mut: mt.mut == mut, kind: unbox, outer_t: t}]; t = mt.ty; } ty::ty_uniq(mt) { - ds += [@{mut: mt.mut != imm, kind: unbox, outer_t: t}]; + ds += [@{mut: mt.mut == mut, kind: unbox, outer_t: t}]; t = mt.ty; } ty::ty_res(_, inner, tps) {