From 7c25fb5628c398b79b9293b6b31d62936dcba613 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 10 Feb 2011 17:33:08 -0800 Subject: [PATCH] Fix bug in trans_field, un-XFAIL two more tests. --- src/Makefile | 2 ++ src/comp/middle/trans.rs | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index a1c38bb9234..c1f33b91929 100644 --- a/src/Makefile +++ b/src/Makefile @@ -449,6 +449,7 @@ TEST_XFAILS_RUSTC := $(filter-out \ arith-0.rs \ arith-1.rs \ arith-2.rs \ + auto-instantiate.rs \ autoderef-full-lval.rs \ bind-exterior.rs \ bind-interior.rs \ @@ -479,6 +480,7 @@ TEST_XFAILS_RUSTC := $(filter-out \ generic-exterior-box.rs \ generic-drop-glue.rs \ generic-obj.rs \ + generic-obj-with-derived-type.rs \ generic-tup.rs \ generic-type.rs \ generic-type-synonym.rs \ diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 6399b900f5e..4135a6e59de 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -2376,10 +2376,8 @@ fn trans_path(@block_ctxt cx, &ast.path p, &option.t[ast.def] dopt, fn trans_field(@block_ctxt cx, &ast.span sp, @ast.expr base, &ast.ident field, &ast.ann ann) -> lval_result { - auto lv = trans_lval(cx, base); - auto r = lv.res; + auto r = trans_expr(cx, base); r = autoderef(r.bcx, r.val, ty.expr_ty(base)); - check (lv.is_mem); auto t = ty.expr_ty(base); alt (t.struct) { case (ty.ty_tup(?fields)) { -- GitLab