aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-02-10 17:33:08 -0800
committerGraydon Hoare <[email protected]>2011-02-10 17:33:08 -0800
commit7c25fb5628c398b79b9293b6b31d62936dcba613 (patch)
treea828950d73268acc5a7f95048106b331d08b09f5 /src
parentAdd type checking for native types. (diff)
downloadrust-7c25fb5628c398b79b9293b6b31d62936dcba613.tar.xz
rust-7c25fb5628c398b79b9293b6b31d62936dcba613.zip
Fix bug in trans_field, un-XFAIL two more tests.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile2
-rw-r--r--src/comp/middle/trans.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index a1c38bb9..c1f33b91 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 6399b900..4135a6e5 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)) {