提交 7c25fb56 编写于 作者: G Graydon Hoare

Fix bug in trans_field, un-XFAIL two more tests.

上级 0d27eb13
......@@ -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 \
......
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册